Author: jmitchell
Date: Sat Apr 30 09:25:14 2005
New Revision: 165410
URL: http://svn.apache.org/viewcvs?rev=165410&view=rev
Log:
bring faces current with all dependent subprojects(core, taglib, and tiles),
upgrade to htmlunit 1.5
Modified:
struts/faces/trunk/build.properties.sample
struts/faces/trunk/core-library/src/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java
struts/faces/trunk/core-library/src/java/org/apache/struts/faces/util/StrutsContext.java
struts/faces/trunk/sysclient-app/src/java/org/apache/struts/faces/sysclient/AbstractTestCase.java
struts/faces/trunk/sysclient-app/src/java/org/apache/struts/faces/sysclient/LogonTestCase.java
struts/faces/trunk/sysclient-app/src/java/org/apache/struts/faces/sysclient/SimpleTestCase.java
Modified: struts/faces/trunk/build.properties.sample
URL:
http://svn.apache.org/viewcvs/struts/faces/trunk/build.properties.sample?rev=165410&r1=165409&r2=165410&view=diff
==============================================================================
--- struts/faces/trunk/build.properties.sample (original)
+++ struts/faces/trunk/build.properties.sample Sat Apr 30 09:25:14 2005
@@ -142,7 +142,7 @@
# The absolute or relative pathname to your installation of HtmlUnit 1.2.3
# or later. This code can be acquired at SourceForge.
-htmlunit.home=/usr/local/htmlunit-1.2.3
+htmlunit.home=/usr/local/htmlunit-1.5
# The type of JSF state saving that should be used when the system integration
# test web application is depoyed ("client" or "server")
Modified:
struts/faces/trunk/core-library/src/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java
URL:
http://svn.apache.org/viewcvs/struts/faces/trunk/core-library/src/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java?rev=165410&r1=165409&r2=165410&view=diff
==============================================================================
---
struts/faces/trunk/core-library/src/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java
(original)
+++
struts/faces/trunk/core-library/src/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java
Sat Apr 30 09:25:14 2005
@@ -28,6 +28,7 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.webapp.UIComponentTag;
+import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.PageContext;
@@ -38,13 +39,14 @@
import org.apache.commons.validator.Form;
import org.apache.commons.validator.ValidatorAction;
import org.apache.commons.validator.ValidatorResources;
-import org.apache.commons.validator.ValidatorUtil;
import org.apache.commons.validator.Var;
+import org.apache.commons.validator.util.ValidatorUtils;
import org.apache.struts.Globals;
import org.apache.struts.config.ModuleConfig;
import org.apache.struts.faces.component.FormComponent;
+import org.apache.struts.taglib.TagUtils;
import org.apache.struts.util.MessageResources;
-import org.apache.struts.util.RequestUtils;
+import org.apache.struts.util.ModuleUtils;
import org.apache.struts.validator.Resources;
import org.apache.struts.validator.ValidatorPlugIn;
@@ -267,15 +269,16 @@
public int doStartTag() throws JspException {
StringBuffer results = new StringBuffer();
- ModuleConfig config = RequestUtils.getModuleConfig(pageContext);
+ HttpServletRequest request =
(HttpServletRequest)pageContext.getRequest();
+ ModuleConfig config =
ModuleUtils.getInstance().getModuleConfig(request);
ValidatorResources resources =
(ValidatorResources) pageContext.getAttribute(
ValidatorPlugIn.VALIDATOR_KEY + config.getPrefix(),
PageContext.APPLICATION_SCOPE);
- Locale locale = RequestUtils.retrieveUserLocale(this.pageContext,
null);
+ Locale locale = TagUtils.getInstance().getUserLocale(pageContext,
null);
- Form form = resources.get(locale, formName);
+ Form form = resources.getForm(locale, formName);
if (form != null) {
if ("true".equalsIgnoreCase(dynamicJavascript)) {
MessageResources messages =
@@ -290,7 +293,7 @@
for (Iterator i = form.getFields().iterator(); i.hasNext();) {
Field field = (Field) i.next();
- for (Iterator x = field.getDependencies().iterator();
x.hasNext();) {
+ for (Iterator x = field.getDependencyList().iterator();
x.hasNext();) {
Object o = x.next();
if (o != null && !lActionMethods.contains(o)) {
@@ -338,7 +341,7 @@
&& (va2.getDepends() != null &&
va2.getDepends().length() > 0)) {
return -1;
} else {
- return va1.getDependencies().size() -
va2.getDependencies().size();
+ return va1.getDependencyList().size() -
va2.getDependencyList().size();
}
}
});
@@ -425,7 +428,7 @@
"this."
+ varName
+ "="
- + ValidatorUtil.replace(
+ + ValidatorUtils.replace(
varValue,
"\\",
"\\\\")
@@ -435,7 +438,7 @@
"this."
+ varName
+ "=/"
- + ValidatorUtil.replace(
+ + ValidatorUtils.replace(
varValue,
"\\",
"\\\\")
@@ -445,7 +448,7 @@
"this."
+ varName
+ "='"
- + ValidatorUtil.replace(
+ + ValidatorUtils.replace(
varValue,
"\\",
"\\\\")
@@ -456,7 +459,7 @@
"this."
+ varName
+ "=/"
- + ValidatorUtil.replace(
+ + ValidatorUtils.replace(
varValue,
"\\",
"\\\\")
@@ -466,7 +469,7 @@
"this."
+ varName
+ "='"
- + ValidatorUtil.replace(
+ + ValidatorUtils.replace(
varValue,
"\\",
"\\\\")
@@ -683,7 +686,7 @@
* Returns true if this is an xhtml page.
*/
private boolean isXhtml() {
- return RequestUtils.isXhtml(this.pageContext);
+ return TagUtils.getInstance().isXhtml(this.pageContext);
}
/**
Modified:
struts/faces/trunk/core-library/src/java/org/apache/struts/faces/util/StrutsContext.java
URL:
http://svn.apache.org/viewcvs/struts/faces/trunk/core-library/src/java/org/apache/struts/faces/util/StrutsContext.java?rev=165410&r1=165409&r2=165410&view=diff
==============================================================================
---
struts/faces/trunk/core-library/src/java/org/apache/struts/faces/util/StrutsContext.java
(original)
+++
struts/faces/trunk/core-library/src/java/org/apache/struts/faces/util/StrutsContext.java
Sat Apr 30 09:25:14 2005
@@ -129,17 +129,6 @@
}
- /**
- * <p>Return the default <code>DataSource</code> instance for this
- * application (if any).</p>
- */
- public DataSource getDataSource() {
-
- return ((DataSource) econtext.getApplicationMap().
- get(Globals.DATA_SOURCE_KEY));
-
- }
-
/**
* <p>Return the exception that caused one of the Struts custom tags
Modified:
struts/faces/trunk/sysclient-app/src/java/org/apache/struts/faces/sysclient/AbstractTestCase.java
URL:
http://svn.apache.org/viewcvs/struts/faces/trunk/sysclient-app/src/java/org/apache/struts/faces/sysclient/AbstractTestCase.java?rev=165410&r1=165409&r2=165410&view=diff
==============================================================================
---
struts/faces/trunk/sysclient-app/src/java/org/apache/struts/faces/sysclient/AbstractTestCase.java
(original)
+++
struts/faces/trunk/sysclient-app/src/java/org/apache/struts/faces/sysclient/AbstractTestCase.java
Sat Apr 30 09:25:14 2005
@@ -16,28 +16,25 @@
package org.apache.struts.faces.sysclient;
-import com.gargoylesoftware.htmlunit.ElementNotFoundException;
-import com.gargoylesoftware.htmlunit.WebClient;
-import com.gargoylesoftware.htmlunit.html.HtmlAnchor;
-import com.gargoylesoftware.htmlunit.html.HtmlBody;
-import com.gargoylesoftware.htmlunit.html.HtmlElement;
-import com.gargoylesoftware.htmlunit.html.HtmlForm;
-import com.gargoylesoftware.htmlunit.html.HtmlHead;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
-import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
-
import java.io.IOException;
import java.net.URL;
-import java.util.ArrayList;
import java.util.Iterator;
-import java.util.List;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
-import org.apache.commons.httpclient.Cookie;
import org.apache.commons.httpclient.HttpState;
+
+import com.gargoylesoftware.htmlunit.ElementNotFoundException;
+import com.gargoylesoftware.htmlunit.WebClient;
+import com.gargoylesoftware.htmlunit.html.HtmlAnchor;
+import com.gargoylesoftware.htmlunit.html.HtmlBody;
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlForm;
+import com.gargoylesoftware.htmlunit.html.HtmlHead;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
Modified:
struts/faces/trunk/sysclient-app/src/java/org/apache/struts/faces/sysclient/LogonTestCase.java
URL:
http://svn.apache.org/viewcvs/struts/faces/trunk/sysclient-app/src/java/org/apache/struts/faces/sysclient/LogonTestCase.java?rev=165410&r1=165409&r2=165410&view=diff
==============================================================================
---
struts/faces/trunk/sysclient-app/src/java/org/apache/struts/faces/sysclient/LogonTestCase.java
(original)
+++
struts/faces/trunk/sysclient-app/src/java/org/apache/struts/faces/sysclient/LogonTestCase.java
Sat Apr 30 09:25:14 2005
@@ -154,7 +154,7 @@
HtmlSpan span = null;
- HtmlElement html = page;
+ HtmlElement html = page.getDocumentElement();
assertEquals("html", html.getTagName());
assertEquals("http://www.w3.org/1999/xhtml",
html.getAttributeValue("xmlns"));
Modified:
struts/faces/trunk/sysclient-app/src/java/org/apache/struts/faces/sysclient/SimpleTestCase.java
URL:
http://svn.apache.org/viewcvs/struts/faces/trunk/sysclient-app/src/java/org/apache/struts/faces/sysclient/SimpleTestCase.java?rev=165410&r1=165409&r2=165410&view=diff
==============================================================================
---
struts/faces/trunk/sysclient-app/src/java/org/apache/struts/faces/sysclient/SimpleTestCase.java
(original)
+++
struts/faces/trunk/sysclient-app/src/java/org/apache/struts/faces/sysclient/SimpleTestCase.java
Sat Apr 30 09:25:14 2005
@@ -99,7 +99,7 @@
public void testBase() throws Exception {
HtmlBase base = null;
- Iterator kids = head().getChildElements().iterator();
+ Iterator kids = head().getChildIterator();
while (kids.hasNext()) {
HtmlElement kid = (HtmlElement) kids.next();
if (kid instanceof HtmlBase) {
@@ -120,7 +120,7 @@
*/
public void testHtml() throws Exception {
- HtmlElement html = page;
+ HtmlElement html = page.getDocumentElement();
assertEquals("html", html.getTagName());
assertEquals("http://www.w3.org/1999/xhtml",
html.getAttributeValue("xmlns"));
// TODO: verify the "lang" attribute
@@ -188,7 +188,7 @@
public void testStylesheet() throws Exception {
HtmlLink link = null;
- Iterator kids = head().getChildElements().iterator();
+ Iterator kids = head().getChildElementsIterator();
while (kids.hasNext()) {
HtmlElement kid = (HtmlElement) kids.next();
if (kid instanceof HtmlLink) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]