svn commit: r399736 - /incubator/webwork2/thirdparty/pell-file-upload/pom.xml

2006-05-04 Thread tmjee
Author: tmjee
Date: Thu May  4 08:32:53 2006
New Revision: 399736

URL: http://svn.apache.org/viewcvs?rev=399736&view=rev
Log:
added dependency on commons-logging which the PellMultipartRequest.java
used to make IDE specific files generated by maven happy about it.


Modified:
incubator/webwork2/thirdparty/pell-file-upload/pom.xml

Modified: incubator/webwork2/thirdparty/pell-file-upload/pom.xml
URL: 
http://svn.apache.org/viewcvs/incubator/webwork2/thirdparty/pell-file-upload/pom.xml?rev=399736&r1=399735&r2=399736&view=diff
==
--- incubator/webwork2/thirdparty/pell-file-upload/pom.xml (original)
+++ incubator/webwork2/thirdparty/pell-file-upload/pom.xml Thu May  4 08:32:53 
2006
@@ -22,6 +22,11 @@
 javax.servlet
 servlet-api
 provided
-   
+  
+
+   
+   commons-logging
+   commons-logging
+
 
 




svn commit: r399763 - /incubator/webwork2/pom.xml

2006-05-04 Thread tmjee
Author: tmjee
Date: Thu May  4 10:00:09 2006
New Revision: 399763

URL: http://svn.apache.org/viewcvs?rev=399763&view=rev
Log:
changed nanocontainer-nanowar's version from 1.0 to 1.0-SNAPSHOT, cause
there's not yet a 1.0 release from CodeHaus, just pre 1.0, so that maven
will not complain when running some of its lifecycle.


Modified:
incubator/webwork2/pom.xml

Modified: incubator/webwork2/pom.xml
URL: 
http://svn.apache.org/viewcvs/incubator/webwork2/pom.xml?rev=399763&r1=399762&r2=399763&view=diff
==
--- incubator/webwork2/pom.xml (original)
+++ incubator/webwork2/pom.xml Thu May  4 10:00:09 2006
@@ -424,7 +424,7 @@
 
 nanocontainer
 nanocontainer-nanowar
-1.0
+1.0-SNAPSHOT
 
 
 




svn commit: r400334 - in /incubator/webwork2: thirdparty/jasperreports/pom.xml webapps/showcase/pom.xml

2006-05-06 Thread tmjee
Author: tmjee
Date: Sat May  6 09:51:26 2006
New Revision: 400334

URL: http://svn.apache.org/viewcvs?rev=400334&view=rev
Log:
- added dependency on action-jasperreport in showcase's pom, cause some
  example needs jasperreport
- added dependency of jasperreport in thirdparty/jasperreports's pom
  cause the WW/SAF result needs jasperreport
- added jetty6 plugin into showcase, for quick developement. Jetty6
  could be started with just 'mvn jetty6:run'



Modified:
incubator/webwork2/thirdparty/jasperreports/pom.xml
incubator/webwork2/webapps/showcase/pom.xml

Modified: incubator/webwork2/thirdparty/jasperreports/pom.xml
URL: 
http://svn.apache.org/viewcvs/incubator/webwork2/thirdparty/jasperreports/pom.xml?rev=400334&r1=400333&r2=400334&view=diff
==
--- incubator/webwork2/thirdparty/jasperreports/pom.xml (original)
+++ incubator/webwork2/thirdparty/jasperreports/pom.xml Sat May  6 09:51:26 2006
@@ -15,6 +15,7 @@
 
 jasperreports
 jasperreports
+1.2.1
 
 
 

Modified: incubator/webwork2/webapps/showcase/pom.xml
URL: 
http://svn.apache.org/viewcvs/incubator/webwork2/webapps/showcase/pom.xml?rev=400334&r1=400333&r2=400334&view=diff
==
--- incubator/webwork2/webapps/showcase/pom.xml (original)
+++ incubator/webwork2/webapps/showcase/pom.xml Sat May  6 09:51:26 2006
@@ -62,5 +62,36 @@
 org.springframework
 spring-web
 
+
+
+jasperreports
+jasperreports
+1.2.1
+
+
+
+   org.apache.struts.action2
+   action-jasperreports
+  
 
+
+
+   
+   
+   org.mortbay.jetty
+   maven-jetty6-plugin
+   
+   10
+   
+   
+   
+   
org.apache.geronimo.specs
+   
geronimo-j2ee_1.4_spec
+   1.0
+   provided
+   
+   
+   
+   
+
 




svn commit: r400335 - /incubator/webwork2/action/src/main/java/org/apache/struts/action2/components/Form.java

2006-05-06 Thread tmjee
Author: tmjee
Date: Sat May  6 10:01:16 2006
New Revision: 400335

URL: http://svn.apache.org/viewcvs?rev=400335&view=rev
Log:
- added comment in the code


Modified:

incubator/webwork2/action/src/main/java/org/apache/struts/action2/components/Form.java

Modified: 
incubator/webwork2/action/src/main/java/org/apache/struts/action2/components/Form.java
URL: 
http://svn.apache.org/viewcvs/incubator/webwork2/action/src/main/java/org/apache/struts/action2/components/Form.java?rev=400335&r1=400334&r2=400335&view=diff
==
--- 
incubator/webwork2/action/src/main/java/org/apache/struts/action2/components/Form.java
 (original)
+++ 
incubator/webwork2/action/src/main/java/org/apache/struts/action2/components/Form.java
 Sat May  6 10:01:16 2006
@@ -210,6 +210,10 @@
 addParameter("id", action);
 }
 } else if (action != null) {
+   // Since we can't find an action alias in the configuration, we 
just assume
+   // the action attribute supplied is the path to be used as the 
uri this 
+   // form is submitting to.
+   
 String result = UrlHelper.buildUrl(action, request, response, 
null);
 addParameter("action", result);
 




svn commit: r400339 - in /incubator/webwork2/webapps: blank/pom.xml shopping-cart/pom.xml starter/pom.xml

2006-05-06 Thread tmjee
Author: tmjee
Date: Sat May  6 10:09:33 2006
New Revision: 400339

URL: http://svn.apache.org/viewcvs?rev=400339&view=rev
Log:
- added jetty6 plugin into pom.xml


Modified:
incubator/webwork2/webapps/blank/pom.xml
incubator/webwork2/webapps/shopping-cart/pom.xml
incubator/webwork2/webapps/starter/pom.xml

Modified: incubator/webwork2/webapps/blank/pom.xml
URL: 
http://svn.apache.org/viewcvs/incubator/webwork2/webapps/blank/pom.xml?rev=400339&r1=400338&r2=400339&view=diff
==
--- incubator/webwork2/webapps/blank/pom.xml (original)
+++ incubator/webwork2/webapps/blank/pom.xml Sat May  6 10:09:33 2006
@@ -13,4 +13,24 @@
 Blank Webapp
 
 
+
+
+   
+   
+   org.mortbay.jetty
+   maven-jetty6-plugin
+   
+   10
+   
+   
+   
+   
org.apache.geronimo.specs
+   
geronimo-j2ee_1.4_spec
+   1.0
+   provided
+   
+   
+   
+   
+
 

Modified: incubator/webwork2/webapps/shopping-cart/pom.xml
URL: 
http://svn.apache.org/viewcvs/incubator/webwork2/webapps/shopping-cart/pom.xml?rev=400339&r1=400338&r2=400339&view=diff
==
--- incubator/webwork2/webapps/shopping-cart/pom.xml (original)
+++ incubator/webwork2/webapps/shopping-cart/pom.xml Sat May  6 10:09:33 2006
@@ -13,4 +13,24 @@
 Shopping Cart Webapp
 
 
+
+
+   
+   
+   org.mortbay.jetty
+   maven-jetty6-plugin
+   
+   10
+   
+   
+   
+   
org.apache.geronimo.specs
+   
geronimo-j2ee_1.4_spec
+   1.0
+   provided
+   
+   
+   
+   
+
 

Modified: incubator/webwork2/webapps/starter/pom.xml
URL: 
http://svn.apache.org/viewcvs/incubator/webwork2/webapps/starter/pom.xml?rev=400339&r1=400338&r2=400339&view=diff
==
--- incubator/webwork2/webapps/starter/pom.xml (original)
+++ incubator/webwork2/webapps/starter/pom.xml Sat May  6 10:09:33 2006
@@ -13,4 +13,24 @@
 Starter Webapp
 
 
+
+
+   
+   
+   org.mortbay.jetty
+   maven-jetty6-plugin
+   
+   10
+   
+   
+   
+   
org.apache.geronimo.specs
+   
geronimo-j2ee_1.4_spec
+   1.0
+   provided
+   
+   
+   
+   
+
 




svn commit: r404739 - in /incubator/webwork2/core/src: main/java/org/apache/struts/action2/components/ test/java/org/apache/struts/action2/views/jsp/ui/ test/resources/org/apache/struts/action2/views/

2006-05-07 Thread tmjee
Author: tmjee
Date: Sun May  7 00:44:05 2006
New Revision: 404739

URL: http://svn.apache.org/viewcvs?rev=404739&view=rev
Log:
ww-1307



Added:

incubator/webwork2/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Formtag-10.txt
   (with props)

incubator/webwork2/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Formtag-9.txt
   (with props)
Modified:

incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Form.java

incubator/webwork2/core/src/test/java/org/apache/struts/action2/views/jsp/ui/FormTagTest.java

Modified: 
incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Form.java
URL: 
http://svn.apache.org/viewcvs/incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Form.java?rev=404739&r1=404738&r2=404739&view=diff
==
--- 
incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Form.java
 (original)
+++ 
incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Form.java
 Sun May  7 00:44:05 2006
@@ -173,16 +173,17 @@
 action = uri.substring(uri.lastIndexOf('/'));
 }
 }
+
+String actionMethod = "";
+if (action.indexOf("!") != -1) {
+   int endIdx = action.lastIndexOf("!");
+   actionMethod = action.substring(endIdx+1, action.length());
+   action = action.substring(0, endIdx);
+}
 
 final ActionConfig actionConfig = 
ConfigurationManager.getConfiguration().getRuntimeConfiguration().getActionConfig(namespace,
 action);
 String actionName = action;
 if (actionConfig != null) {
-String actionMethod = "";
-if (action.indexOf("!") != -1) {
-int endIdx = action.lastIndexOf("!");
-actionMethod = action.substring(endIdx + 1, action.length());
-action = action.substring(0, endIdx);
-}
 
 ActionMapping mapping = new ActionMapping(action, namespace, 
actionMethod, parameters);
 String result = 
UrlHelper.buildUrl(ActionMapperFactory.getMapper().getUriFromActionMapping(mapping),
 request, response, null);

Modified: 
incubator/webwork2/core/src/test/java/org/apache/struts/action2/views/jsp/ui/FormTagTest.java
URL: 
http://svn.apache.org/viewcvs/incubator/webwork2/core/src/test/java/org/apache/struts/action2/views/jsp/ui/FormTagTest.java?rev=404739&r1=404738&r2=404739&view=diff
==
--- 
incubator/webwork2/core/src/test/java/org/apache/struts/action2/views/jsp/ui/FormTagTest.java
 (original)
+++ 
incubator/webwork2/core/src/test/java/org/apache/struts/action2/views/jsp/ui/FormTagTest.java
 Sun May  7 00:44:05 2006
@@ -35,6 +35,47 @@
  */
 public class FormTagTest extends AbstractUITagTest {
 
+   public void testFormWithActionAttributeContainingBothActionAndMethod() 
throws Exception {
+   TestAction testAction = (TestAction) action;
+   
+   FormTag tag = new FormTag();
+   tag.setPageContext(pageContext);
+   tag.setName("myForm");
+   tag.setMethod("POST");
+   tag.setAcceptcharset("UTF-8");
+tag.setAction("testAction!myLittleMethod");
+tag.setEnctype("myEncType");
+tag.setTitle("mytitle");
+tag.setOnsubmit("submitMe()");
+
+tag.doStartTag();
+tag.doEndTag();
+
+verify(FormTag.class.getResource("Formtag-9.txt"));
+   }
+   
+   
+   public void 
testFormWithActionAttributeContainingBothActionAndMethodAndNamespace() throws 
Exception {
+   TestAction testAction = (TestAction) action;
+   
+   FormTag tag = new FormTag();
+   tag.setPageContext(pageContext);
+   tag.setName("myForm");
+   tag.setNamespace("/testNamespace");
+   tag.setMethod("POST");
+   tag.setAcceptcharset("UTF-8");
+tag.setAction("testNamespaceAction!myLittleMethod");
+tag.setEnctype("myEncType");
+tag.setTitle("mytitle");
+tag.setOnsubmit("submitMe()");
+
+tag.doStartTag();
+tag.doEndTag();
+
+verify(FormTag.class.getResource("Formtag-10.txt"));
+   }
+   
+   
 public void testForm() throws Exception {

 request.setupGetServletPath("/testAction");

Added: 
incubator/webwork2/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Formtag-10.txt
URL: 
http://svn.apache.org/viewcvs/incub

svn commit: r404760 - /incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Form.java

2006-05-07 Thread tmjee
Author: tmjee
Date: Sun May  7 06:50:31 2006
New Revision: 404760

URL: http://svn.apache.org/viewcvs?rev=404760&view=rev
Log:
added into javadoc snippet explanation on how the form tag posting url
is derived (the logic)


Modified:

incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Form.java

Modified: 
incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Form.java
URL: 
http://svn.apache.org/viewcvs/incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Form.java?rev=404760&r1=404759&r2=404760&view=diff
==
--- 
incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Form.java
 (original)
+++ 
incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Form.java
 Sun May  7 06:50:31 2006
@@ -50,6 +50,24 @@
  *
  * The remote form allows the form to be submitted without the page being 
refreshed. The results from the form
  * can be inserted into any HTML element on the page.
+ * 
+ * NOTE:
+ * The order / logic in determining the posting url of the generated HTML form 
is as follows:-
+ * 
+ *  
+ *  If the action attribute is not specified, then the current request 
will be used to
+ *   determine the posting url
+ *   
+ *   
+ *   If the action is given, SAF will try to obtain an ActionConfig. This will 
be 
+ *   successfull if the action attribute is a valid action alias defined 
xwork.xml.
+ *   
+ *   
+ *   If the action is given and is not an action alias defined in xwork.xmlm 
SAF
+ *   will used the action attribute as if it is the posting url, separting the 
namespace
+ *   from it and using UrlHelper to generate the final url.
+ *   
+ * 
  *
  * 
  *




svn commit: r404761 - in /incubator/webwork2/core/src: main/java/org/apache/struts/action2/components/ test/java/org/apache/struts/action2/views/jsp/ui/ test/resources/org/apache/struts/action2/views/

2006-05-07 Thread tmjee
Author: tmjee
Date: Sun May  7 06:51:44 2006
New Revision: 404761

URL: http://svn.apache.org/viewcvs?rev=404761&view=rev
Log:
ww-769


Added:

incubator/webwork2/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Component-2.txt
   (with props)

incubator/webwork2/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Component-3.txt
   (with props)
Modified:

incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Component.java

incubator/webwork2/core/src/test/java/org/apache/struts/action2/views/jsp/ui/ComponentTest.java

Modified: 
incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Component.java
URL: 
http://svn.apache.org/viewcvs/incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Component.java?rev=404761&r1=404760&r2=404761&view=diff
==
--- 
incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Component.java
 (original)
+++ 
incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Component.java
 Sun May  7 06:51:44 2006
@@ -446,7 +446,9 @@
  * @a2.tagattribute required="false"
  */
 public void setId(String id) {
-this.id = id;
+   if (id != null) {
+   this.id = findString(id);
+   }
 }
 
 /**

Modified: 
incubator/webwork2/core/src/test/java/org/apache/struts/action2/views/jsp/ui/ComponentTest.java
URL: 
http://svn.apache.org/viewcvs/incubator/webwork2/core/src/test/java/org/apache/struts/action2/views/jsp/ui/ComponentTest.java?rev=404761&r1=404760&r2=404761&view=diff
==
--- 
incubator/webwork2/core/src/test/java/org/apache/struts/action2/views/jsp/ui/ComponentTest.java
 (original)
+++ 
incubator/webwork2/core/src/test/java/org/apache/struts/action2/views/jsp/ui/ComponentTest.java
 Sun May  7 06:51:44 2006
@@ -25,6 +25,45 @@
  */
 public class ComponentTest extends AbstractUITagTest {
 
+   /**
+* Test that id attribute is evaludated against the Ognl Stack.
+* @throws Exception
+*/
+   public void testIdIsEvaluatedAgainstStack1() throws Exception {
+   TestAction testAction = (TestAction) action;
+   testAction.setFoo("myFooValue");
+   
+   TextFieldTag tag = new TextFieldTag();
+   tag.setPageContext(pageContext);
+tag.setLabel("mylabel");
+tag.setName("myname");
+tag.setValue("foo");
+tag.setId("%{foo}");
+   
+tag.doStartTag();
+tag.doEndTag();
+
+verify(ComponentTag.class.getResource("Component-2.txt"));
+   }
+   
+   public void testIdIsEvaludatedAgainstStack2() throws Exception {
+   TestAction testAction = (TestAction) action;
+   testAction.setFoo("myFooValue");
+   
+   TextFieldTag tag = new TextFieldTag();
+   tag.setPageContext(pageContext);
+tag.setLabel("mylabel");
+tag.setName("myname");
+tag.setValue("foo");
+tag.setId("foo");
+   
+tag.doStartTag();
+tag.doEndTag();
+
+verify(ComponentTag.class.getResource("Component-3.txt"));
+   }
+   
+   
 /**
  * Note -- this test uses empty.vm, so it's basically clear
  */

Added: 
incubator/webwork2/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Component-2.txt
URL: 
http://svn.apache.org/viewcvs/incubator/webwork2/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Component-2.txt?rev=404761&view=auto
==
--- 
incubator/webwork2/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Component-2.txt
 (added)
+++ 
incubator/webwork2/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Component-2.txt
 Sun May  7 06:51:44 2006
@@ -0,0 +1,8 @@
+
+   
+   mylabel:
+   
+   
+   
+   
+

Propchange: 
incubator/webwork2/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Component-2.txt
--
svn:eol-style = native

Added: 
incubator/webwork2/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Component-3.txt
URL: 
http://svn.apache.org/viewcvs/incubator/webwork2/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Component-3.txt?rev=404761&view=auto
==
--- 
incubator/webwork2/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Component-3.txt
 (added)
+++ 
inc

svn commit: r404790 - /incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Set.java

2006-05-07 Thread tmjee
Author: tmjee
Date: Sun May  7 09:25:19 2006
New Revision: 404790

URL: http://svn.apache.org/viewcvs?rev=404790&view=rev
Log:
ww-796

- set tag with no scope specified (which defaults to action scope) will
  now store the value under the name as its key in both action and page
  context now.


Modified:

incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Set.java

Modified: 
incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Set.java
URL: 
http://svn.apache.org/viewcvs/incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Set.java?rev=404790&r1=404789&r2=404790&view=diff
==
--- 
incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Set.java
 (original)
+++ 
incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Set.java
 Sun May  7 09:25:19 2006
@@ -27,6 +27,18 @@
  * complex expression and then simply reference that variable each time rather 
than the complex expression. This is
  * useful in both cases: when the complex expression takes time (performance 
improvement) or is hard to read (code
  * readability improvement).
+ * 
+ * The scopes available are as follows :-
+ * 
+ *   application - the value will be set in application scope according to 
servlet spec. using the name as its key
+ *   session - the value will be set in session scope according to servlet 
spec. using the name as key 
+ *   request - the value will be set in request scope according to servlet 
spec. using the name as key 
+ *   page - the value will be set in request scope according to servlet 
sepc. using the name as key
+ *   action - the value will be set in the request scope and SAF's action 
context using the name as key
+ * 
+ * 
+ * NOTE:
+ * If no scope is specified, it will default to action scope.
  *
  * 
  *
@@ -98,6 +110,7 @@
 stack.setValue("#attr['" + name + "']", o, false);
 } else {
 stack.getContext().put(name, o);
+stack.setValue("#attr['" + name + "']", o, false);
 }
 
 return super.end(writer, body);




svn commit: r404946 - /struts/action2/trunk/core/pom.xml

2006-05-08 Thread tmjee
Author: tmjee
Date: Mon May  8 00:12:28 2006
New Revision: 404946

URL: http://svn.apache.org/viewcvs?rev=404946&view=rev
Log:
- easymockextension declare dependency on easymock version 1.1, but SAF 
actually needs easymock 2.0 for some of its test. Add an exclusion on 
easymockextension to exclude easymock 1.1 dependency on it 

Modified:
struts/action2/trunk/core/pom.xml

Modified: struts/action2/trunk/core/pom.xml
URL: 
http://svn.apache.org/viewcvs/struts/action2/trunk/core/pom.xml?rev=404946&r1=404945&r2=404946&view=diff
==
--- struts/action2/trunk/core/pom.xml (original)
+++ struts/action2/trunk/core/pom.xml Mon May  8 00:12:28 2006
@@ -286,6 +286,12 @@
 easymockclassextension
 1.1
 test
+
+   
+   easymock
+   easymock
+   
+
 
 
 




svn commit: r405079 - /struts/action2/trunk/apps/showcase/pom.xml

2006-05-08 Thread tmjee
Author: tmjee
Date: Mon May  8 08:53:37 2006
New Revision: 405079

URL: http://svn.apache.org/viewcvs?rev=405079&view=rev
Log:
- added dwr dependency into pom.xml


Modified:
struts/action2/trunk/apps/showcase/pom.xml

Modified: struts/action2/trunk/apps/showcase/pom.xml
URL: 
http://svn.apache.org/viewcvs/struts/action2/trunk/apps/showcase/pom.xml?rev=405079&r1=405078&r2=405079&view=diff
==
--- struts/action2/trunk/apps/showcase/pom.xml (original)
+++ struts/action2/trunk/apps/showcase/pom.xml Mon May  8 08:53:37 2006
@@ -71,6 +71,12 @@
 1.2.6
 

+
+uk.ltd.getahead
+dwr
+1.1-beta-3
+true
+
 
 
 




svn commit: r405678 - /struts/action2/trunk/core/src/main/java/org/apache/struts/action2/config/DefaultConfiguration.java

2006-05-10 Thread tmjee
Author: tmjee
Date: Wed May 10 01:42:16 2006
New Revision: 405678

URL: http://svn.apache.org/viewcvs?rev=405678&view=rev
Log:
added some comments in the code

Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/config/DefaultConfiguration.java

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/config/DefaultConfiguration.java
URL: 
http://svn.apache.org/viewcvs/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/config/DefaultConfiguration.java?rev=405678&r1=405677&r2=405678&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/config/DefaultConfiguration.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/config/DefaultConfiguration.java
 Wed May 10 01:42:16 2006
@@ -79,6 +79,9 @@
 configList = new Configuration[list.size()];
 config = new DelegatingConfiguration((Configuration[]) 
list.toArray(configList));
 } catch (IllegalArgumentException e) {
+// thrown when Configuration is unable to find a certain property
+// eg. struts.custom.properties in default.properties which is 
commented
+// out
 }
 
 // Add addtional list of i18n global resource bundles




svn commit: r405758 - in /struts/action2/trunk/core/src: main/resources/template/simple/radiomap.ftl test/java/org/apache/struts/action2/views/jsp/ui/RadioTest.java test/resources/org/apache/struts/ac

2006-05-10 Thread tmjee
Author: tmjee
Date: Wed May 10 06:34:28 2006
New Revision: 405758

URL: http://svn.apache.org/viewcvs?rev=405758&view=rev
Log:
ww-1310


Added:

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Radio-3.txt
   (with props)
Modified:
struts/action2/trunk/core/src/main/resources/template/simple/radiomap.ftl

struts/action2/trunk/core/src/test/java/org/apache/struts/action2/views/jsp/ui/RadioTest.java

Modified: 
struts/action2/trunk/core/src/main/resources/template/simple/radiomap.ftl
URL: 
http://svn.apache.org/viewcvs/struts/action2/trunk/core/src/main/resources/template/simple/radiomap.ftl?rev=405758&r1=405757&r2=405758&view=diff
==
--- struts/action2/trunk/core/src/main/resources/template/simple/radiomap.ftl 
(original)
+++ struts/action2/trunk/core/src/main/resources/template/simple/radiomap.ftl 
Wed May 10 06:34:28 2006
@@ -1,8 +1,8 @@
 <@saf.iterator value="parameters.list">
 <#if parameters.listKey?exists>
-<#assign itemKey = stack.findValue(parameters.listKey)/>
+<#assign itemKey = stack.findString(parameters.listKey)/>
 <#else>
-<#assign itemKey = stack.findValue('top')/>
+<#assign itemKey = stack.findString('top')/>
 
 <#if parameters.listValue?exists>
 <#assign itemValue = stack.findString(parameters.listValue)/>

Modified: 
struts/action2/trunk/core/src/test/java/org/apache/struts/action2/views/jsp/ui/RadioTest.java
URL: 
http://svn.apache.org/viewcvs/struts/action2/trunk/core/src/test/java/org/apache/struts/action2/views/jsp/ui/RadioTest.java?rev=405758&r1=405757&r2=405758&view=diff
==
--- 
struts/action2/trunk/core/src/test/java/org/apache/struts/action2/views/jsp/ui/RadioTest.java
 (original)
+++ 
struts/action2/trunk/core/src/test/java/org/apache/struts/action2/views/jsp/ui/RadioTest.java
 Wed May 10 06:34:28 2006
@@ -21,11 +21,34 @@
 import org.apache.struts.action2.views.jsp.AbstractUITagTest;
 
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 
 
 /**
  */
 public class RadioTest extends AbstractUITagTest {
+   
+   public void testMapWithBooleanAsKey() throws Exception {
+   TestAction testAction = (TestAction) action;
+   
+   HashMap map = new LinkedHashMap();
+   map.put(Boolean.TRUE, "male");
+   map.put(Boolean.FALSE, "female");
+   testAction.setMap(map);
+   
+   RadioTag tag = new RadioTag();
+   tag.setPageContext(pageContext);
+   tag.setLabel("mylabel");
+   tag.setName("myname");
+   tag.setValue("%{'true'}");
+   tag.setList("map");
+   
+   tag.doStartTag();
+   tag.doEndTag();
+   
+   verify(RadioTag.class.getResource("Radio-3.txt"));
+   }
+   
 
 public void testMapChecked() throws Exception {
 TestAction testAction = (TestAction) action;

Added: 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Radio-3.txt
URL: 
http://svn.apache.org/viewcvs/struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Radio-3.txt?rev=405758&view=auto
==
--- 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Radio-3.txt
 (added)
+++ 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Radio-3.txt
 Wed May 10 06:34:28 2006
@@ -0,0 +1,7 @@
+
+mylabel:
+
+male
+female
+
+

Propchange: 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Radio-3.txt
--
svn:eol-style = native




svn commit: r405999 - /struts/action2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl

2006-05-12 Thread tmjee
Author: tmjee
Date: Fri May 12 19:55:39 2006
New Revision: 405999

URL: http://svn.apache.org/viewcvs?rev=405999&view=rev
Log:
XW-371
WW-1311
- changed javascript regexp fro validator type of both 'regexp' and
  'stringregexp' from

!field.value.match("..."){

to

field.value.match("...")==null) {

cause field.value.match(..) method returns an array or null if no matching 
exists


Modified:

struts/action2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl

Modified: 
struts/action2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl
URL: 
http://svn.apache.org/viewcvs/struts/action2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl?rev=405999&r1=405998&r2=405999&view=diff
==
--- 
struts/action2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl
 (original)
+++ 
struts/action2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl
 Fri May 12 19:55:39 2006
@@ -53,23 +53,22 @@
 }
 }
 <#elseif validator.validatorType = "regex">
-if (field.value != null && 
!field.value.match("${validator.expression?js_string}")) {
+if (field.value != null && 
!field.value.match("${validator.expression?js_string}")==null) {
 addError(field, error);
 errors = true;
 }
 <#elseif validator.validatorType = "stringregex">
-   if (field.value != null && 
!field.value.match(/${validator.regex}/)) {
+   if (field.value != null && 
field.value.match(/${validator.regex}/)==null) {
addError(field, error);
errors = true;
}
 <#elseif validator.validatorType = "email">
-if (field.value != null && field.value.length > 0 && 
field.value.match(/[EMAIL 
PROTECTED](com|net|org|info|edu|mil|gov|biz|ws|us|tv|cc|aero|arpa|coop|int|jobs|museum|name|pro|travel|nato|.{2,2})$/gi)
 == null) {
+if (field.value != null && field.value.length > 0 && 
field.value.match(/\b(^[_A-Za-z0-9-]+(\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\.[A-Za-z0-9-]+)*((\.[A-Za-z0-9]{2,})|(\.[A-Za-z0-9]{2,}\.[A-Za-z0-9]{2,}))$)\b/gi)==null)
 {
 addError(field, error);
 errors = true;
 }
 <#elseif validator.validatorType = "url">
-<#--if (field.value != null && field.value.length > 0 && 
field.value.match(/[EMAIL 
PROTECTED](com|net|org|info|edu|mil|gov|biz|ws|us|tv|cc|aero|arpa|coop|int|jobs|museum|name|pro|travel|nato|.{2,2})$/gi)
 == null) { -->
-if (field.value != null && field.value.length > 0 && 
field.value.match(/(^[_A-Za-z0-9-]+(\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\.[A-Za-z0-9-]+)*((\.com)|(\.net)|(\.org)|(\.info)|(\.edu)|(\.mil)|(\.gov)|(\.biz)|(\.ws)|(\.us)|(\.tv)|(\.cc)|(\.aero)|(\.arpa)|(\.coop)|(\.int)|(\.jobs)|(\.museum)|(\.name)|(\.pro)|(\.travel)|(\.nato)|(\.[A-Za-z0-9]{2,3})|(\.[A-Za-z0-9]{2,3}\.[A-Za-z0-9]{2,3}))$)/gi)
 == null) { 
+if (field.value != null && field.value.length > 0 && 
field.value.match(/(^(ftp|http|https):\/\/(\.[_A-Za-z0-9-]+)*(@?([A-Za-z0-9-])+)?(\.[A-Za-z0-9-]+)*((\.[A-Za-z0-9]{2,})|(\.[A-Za-z0-9]{2,}\.[A-Za-z0-9]{2,}))(:[0-9]+)?([/A-Za-z0-9?#_-]*)?$)/gi)==null)
 { 
 addError(field, error);
 errors = true;
 }




svn commit: r406273 - in /struts/action2/trunk/core/src: main/java/org/apache/struts/action2/components/ main/resources/template/xhtml/ test/java/org/apache/struts/action2/views/jsp/ui/ test/resources

2006-05-13 Thread tmjee
Author: tmjee
Date: Sat May 13 23:25:18 2006
New Revision: 406273

URL: http://svn.apache.org/viewcvs?rev=406273&view=rev
Log:
WW-1284


Added:

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Formtag-11.txt
   (with props)
Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Form.java

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/UIBean.java

struts/action2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl

struts/action2/trunk/core/src/test/java/org/apache/struts/action2/views/jsp/ui/FormTagTest.java

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Formtag-2.txt

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Form.java
URL: 
http://svn.apache.org/viewcvs/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Form.java?rev=406273&r1=406272&r2=406273&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Form.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Form.java
 Sat May 13 23:25:18 2006
@@ -24,11 +24,14 @@
 import org.apache.struts.action2.portlet.util.PortletUrlHelper;
 import org.apache.struts.action2.views.util.UrlHelper;
 import com.opensymphony.xwork.config.ConfigurationManager;
+import com.opensymphony.xwork.config.RuntimeConfiguration;
 import com.opensymphony.xwork.config.entities.ActionConfig;
+import com.opensymphony.xwork.config.entities.InterceptorMapping;
 import com.opensymphony.xwork.util.OgnlValueStack;
 import com.opensymphony.xwork.ActionContext;
 import com.opensymphony.xwork.ActionInvocation;
 import com.opensymphony.xwork.ObjectFactory;
+import com.opensymphony.xwork.validator.ValidationInterceptor;
 import com.opensymphony.xwork.validator.Validator;
 import com.opensymphony.xwork.validator.FieldValidator;
 import com.opensymphony.xwork.validator.ActionValidatorManagerFactory;
@@ -38,10 +41,13 @@
 
 import org.apache.commons.lang.StringUtils;
 
+import com.opensymphony.xwork.interceptor.MethodFilterInterceptorUtil;
+
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Collections;
 import java.util.Iterator;
+import java.util.Set;
 
 /**
  * 
@@ -126,6 +132,10 @@
 
 boolean isAjax = "ajax".equalsIgnoreCase(this.theme);
 
+if (validate != null) {
+addParameter("validate", findValue(validate, Boolean.class));
+}
+
 // calculate the action and namespace
 String action = null;
 if (this.action != null) {
@@ -157,10 +167,6 @@
 addParameter("method", findString(method));
 }
 
-if (validate != null) {
-addParameter("validate", findValue(validate, Boolean.class));
-}
-
 if (acceptcharset != null) {
 addParameter("acceptcharset", findString(acceptcharset));
 }
@@ -256,6 +262,42 @@
 addParameter("id", escape(id));
 }
 }
+
+// WW-1284
+// evaluate if client-side js is to be enabled. (if validation 
interceptor 
+// does allow validation eg. method is not filtered out)
+evaluateClientSideJsEnablement(actionName, namespace, actionMethod);
+}
+
+private void evaluateClientSideJsEnablement(String actionName, String 
namespace, String actionMethod) {
+   
+   // Only evaluate if Client-Side js is to be enable when validate=true
+   Boolean validate = (Boolean) getParameters().get("validate");
+   if (validate != null && validate.booleanValue()) {
+   
+   addParameter("performValidation", Boolean.FALSE);
+   
+   RuntimeConfiguration runtimeConfiguration = 
ConfigurationManager.getConfiguration().getRuntimeConfiguration();
+   ActionConfig actionConfig = 
runtimeConfiguration.getActionConfig(namespace, actionName);
+
+   if (actionConfig != null) {
+   List interceptors = actionConfig.getInterceptors();
+   for (Iterator i = interceptors.iterator(); i.hasNext(); 
) {
+   InterceptorMapping interceptorMapping = 
(InterceptorMapping) i.next();
+   if 
(ValidationInterceptor.class.isInstance(interceptorMapping.getInterceptor())) {
+   ValidationInterceptor 
validationInterceptor = (ValidationInterceptor) 
interceptorMapping.getInterceptor();
+   
+   Set excludeMethods = 
validationInterceptor.getExcludeMethodsSet();

svn commit: r406288 - /struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ServletActionRedirectResult.java

2006-05-14 Thread tmjee
Author: tmjee
Date: Sun May 14 02:26:02 2006
New Revision: 406288

URL: http://svn.apache.org/viewcvs?rev=406288&view=rev
Log:
WW-1269



Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ServletActionRedirectResult.java

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ServletActionRedirectResult.java
URL: 
http://svn.apache.org/viewcvs/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ServletActionRedirectResult.java?rev=406288&r1=406287&r2=406288&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ServletActionRedirectResult.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ServletActionRedirectResult.java
 Sun May 14 02:26:02 2006
@@ -17,9 +17,13 @@
  */
 package org.apache.struts.action2.dispatcher;
 
+import java.util.Map;
+
 import org.apache.struts.action2.dispatcher.mapper.ActionMapper;
 import org.apache.struts.action2.dispatcher.mapper.ActionMapperFactory;
 import org.apache.struts.action2.dispatcher.mapper.ActionMapping;
+import org.apache.struts.action2.views.util.UrlHelper;
+
 import com.opensymphony.xwork.ActionInvocation;
 
 /**
@@ -85,7 +89,8 @@
 
 protected String actionName;
 protected String namespace;
-
+protected String method;
+
 public void execute(ActionInvocation invocation) throws Exception {
 actionName = conditionalParse(actionName, invocation);
 if (namespace == null) {
@@ -93,9 +98,15 @@
 } else {
 namespace = conditionalParse(namespace, invocation);
 }
+if (method == null) {
+   method = "";
+}
+else {
+   method = conditionalParse(method, invocation);
+}
 
 ActionMapper mapper = ActionMapperFactory.getMapper();
-location = mapper.getUriFromActionMapping(new 
ActionMapping(actionName, namespace, "", null));
+location = mapper.getUriFromActionMapping(new 
ActionMapping(actionName, namespace, method, null));
 
 super.execute(invocation);
 }
@@ -106,5 +117,9 @@
 
 public void setNamespace(String namespace) {
 this.namespace = namespace;
+}
+
+public void setMethod(String method) {
+   this.method = method;
 }
 }




svn commit: r406369 - /struts/action2/trunk/core/src/main/resources/struts-default.xml

2006-05-14 Thread tmjee
Author: tmjee
Date: Sun May 14 09:40:14 2006
New Revision: 406369

URL: http://svn.apache.org/viewcvs?rev=406369&view=rev
Log:
- remove dependencies on old FCK rich text editor


Modified:
struts/action2/trunk/core/src/main/resources/struts-default.xml

Modified: struts/action2/trunk/core/src/main/resources/struts-default.xml
URL: 
http://svn.apache.org/viewcvs/struts/action2/trunk/core/src/main/resources/struts-default.xml?rev=406369&r1=406368&r2=406369&view=diff
==
--- struts/action2/trunk/core/src/main/resources/struts-default.xml (original)
+++ struts/action2/trunk/core/src/main/resources/struts-default.xml Sun May 14 
09:40:14 2006
@@ -14,12 +14,6 @@
 
 
 
-
-
-
-
-
-
 
 
 




svn commit: r406371 - in /struts/action2/trunk/core/src: main/java/org/apache/struts/action2/views/jsp/ui/ test/java/org/apache/struts/action2/views/jsp/ui/

2006-05-14 Thread tmjee
Author: tmjee
Date: Sun May 14 09:44:08 2006
New Revision: 406371

URL: http://svn.apache.org/viewcvs?rev=406371&view=rev
Log:
- remove dependencies on old FCK rich text editor


Removed:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/views/jsp/ui/RichtexteditorCreateFolderResult.java

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/views/jsp/ui/RichtexteditorFileUploadResult.java

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/views/jsp/ui/RichtexteditorGetFoldersAndFilesResult.java

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/views/jsp/ui/RichtexteditorGetFoldersResult.java

struts/action2/trunk/core/src/test/java/org/apache/struts/action2/views/jsp/ui/RichtexteditorCreateFolderResultTest.java

struts/action2/trunk/core/src/test/java/org/apache/struts/action2/views/jsp/ui/RichtexteditorFileUploadResultTest.java

struts/action2/trunk/core/src/test/java/org/apache/struts/action2/views/jsp/ui/RichtexteditorGetFoldersAndFilesResultTest.java

struts/action2/trunk/core/src/test/java/org/apache/struts/action2/views/jsp/ui/RichtexteditorGetFoldersResultTest.java



svn commit: r406375 - /struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/

2006-05-14 Thread tmjee
Author: tmjee
Date: Sun May 14 10:04:58 2006
New Revision: 406375

URL: http://svn.apache.org/viewcvs?rev=406375&view=rev
Log:
- remove dependencies on old FCK rich text editor


Removed:

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/RichtexteditorCreateFolderResultTest1.txt

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/RichtexteditorFileUploadResultTest1.txt

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/RichtexteditorFileUploadResultTest2.txt

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/RichtexteditorFileUploadResultTest3.txt

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/RichtexteditorGetFoldersAndFilesResultTest1.txt

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/RichtexteditorGetFoldersResultTest1.txt



svn commit: r406385 - in /struts/action2/trunk/core/src/main: java/org/apache/struts/action2/components/UIBean.java resources/META-INF/taglib.tld

2006-05-14 Thread tmjee
Author: tmjee
Date: Sun May 14 10:47:20 2006
New Revision: 406385

URL: http://svn.apache.org/viewcvs?rev=406385&view=rev
Log:
WW-1312


Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/UIBean.java
struts/action2/trunk/core/src/main/resources/META-INF/taglib.tld

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/UIBean.java
URL: 
http://svn.apache.org/viewcvs/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/UIBean.java?rev=406385&r1=406384&r2=406385&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/UIBean.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/UIBean.java
 Sun May 14 10:47:20 2006
@@ -964,6 +964,13 @@
 }
 
 
+/**
+ * The template directory.
+ * @a2.tagattribute required="false"
+ */
+public void setTemplateDir(String templateDir) {
+   this.templateDir = templateDir;
+}
 
 /**
  * The theme (other than default) to use for rendering the element

Modified: struts/action2/trunk/core/src/main/resources/META-INF/taglib.tld
URL: 
http://svn.apache.org/viewcvs/struts/action2/trunk/core/src/main/resources/META-INF/taglib.tld?rev=406385&r1=406384&r2=406385&view=diff
==
--- struts/action2/trunk/core/src/main/resources/META-INF/taglib.tld (original)
+++ struts/action2/trunk/core/src/main/resources/META-INF/taglib.tld Sun May 14 
10:47:20 2006
@@ -734,6 +734,14 @@
   
 
   
+ templateDir
+ false
+ true
+
+   
+
+  
+  
  theme
  false
  true




svn commit: r406386 - /struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/UIBean.java

2006-05-14 Thread tmjee
Author: tmjee
Date: Sun May 14 10:51:15 2006
New Revision: 406386

URL: http://svn.apache.org/viewcvs?rev=406386&view=rev
Log:
- remove unecessary import statement


Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/UIBean.java

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/UIBean.java
URL: 
http://svn.apache.org/viewcvs/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/UIBean.java?rev=406386&r1=406385&r2=406386&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/UIBean.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/UIBean.java
 Sun May 14 10:51:15 2006
@@ -32,7 +32,6 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.Writer;
-import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;




svn commit: r406839 - /struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-tags-ui.xml

2006-05-15 Thread tmjee
Author: tmjee
Date: Mon May 15 22:07:13 2006
New Revision: 406839

URL: http://svn.apache.org/viewcvs?rev=406839&view=rev
Log:
- remove dependencies on FCK editor


Modified:

struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-tags-ui.xml

Modified: 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-tags-ui.xml
URL: 
http://svn.apache.org/viewcvs/struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-tags-ui.xml?rev=406839&r1=406838&r2=406839&view=diff
==
--- 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-tags-ui.xml
 (original)
+++ 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-tags-ui.xml
 Mon May 15 22:07:13 2006
@@ -37,21 +37,4 @@
tooltipExample.jsp
 
 
-
-
-
-
-   
-   
-   
-   
-   
-   
-
-
-
-   
-   
-   
-
 




svn commit: r406967 - /struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/HttpHeaderResult.java

2006-05-16 Thread tmjee
Author: tmjee
Date: Tue May 16 08:14:57 2006
New Revision: 406967

URL: http://svn.apache.org/viewcvs?rev=406967&view=rev
Log:
update javadoc


Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/HttpHeaderResult.java

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/HttpHeaderResult.java
URL: 
http://svn.apache.org/viewcvs/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/HttpHeaderResult.java?rev=406967&r1=406966&r2=406967&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/HttpHeaderResult.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/HttpHeaderResult.java
 Tue May 16 08:14:57 2006
@@ -33,7 +33,7 @@
 /**
  * 
  *
- * A custom Result type for evaluating HTTP headers against the ValueStack.
+ * A custom Result type for setting HTTP headers and status by optionally 
evaluating against the ValueStack.
  * 
  * 
  * 




svn commit: r407143 - /struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/UIBean.java

2006-05-16 Thread tmjee
Author: tmjee
Date: Tue May 16 20:55:46 2006
New Revision: 407143

URL: http://svn.apache.org/viewcvs?rev=407143&view=rev
Log:
- replace e.printStackTrace() with LOG.error("...", e);

Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/UIBean.java

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/UIBean.java
URL: 
http://svn.apache.org/viewcvs/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/UIBean.java?rev=407143&r1=407142&r2=407143&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/UIBean.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/UIBean.java
 Tue May 16 20:55:46 2006
@@ -596,7 +596,7 @@
 super.end(writer, body, false);
 mergeTemplate(writer, buildTemplateName(template, 
getDefaultTemplate()));
 } catch (Exception e) {
-e.printStackTrace();
+LOG.error("error when rendering", e);
 }
 finally {
popComponentStack();




svn commit: r407596 - /struts/action2/trunk/build.xml

2006-05-18 Thread tmjee
Author: tmjee
Date: Thu May 18 10:32:48 2006
New Revision: 407596

URL: http://svn.apache.org/viewvc?rev=407596&view=rev
Log:
- fixed the ant build so that xdoclet-taglib and xdoclet-tagdoc will
  generate the taglib.tld and html docs for webwork / saf tags again.


Modified:
struts/action2/trunk/build.xml

Modified: struts/action2/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/build.xml?rev=407596&r1=407595&r2=407596&view=diff
==
--- struts/action2/trunk/build.xml (original)
+++ struts/action2/trunk/build.xml Thu May 18 10:32:48 2006
@@ -1,7 +1,7 @@
 
 
 
-
+
 
 
 




svn commit: r407682 - /struts/action2/trunk/core/src/test/java/org/apache/struts/action2/views/jsp/ui/SubmitTest.java

2006-05-18 Thread tmjee
Author: tmjee
Date: Thu May 18 18:37:26 2006
New Revision: 407682

URL: http://svn.apache.org/viewvc?rev=407682&view=rev
Log:
- fixed failling test (due to added missing id attribute)

Modified:

struts/action2/trunk/core/src/test/java/org/apache/struts/action2/views/jsp/ui/SubmitTest.java

Modified: 
struts/action2/trunk/core/src/test/java/org/apache/struts/action2/views/jsp/ui/SubmitTest.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/test/java/org/apache/struts/action2/views/jsp/ui/SubmitTest.java?rev=407682&r1=407681&r2=407682&view=diff
==
--- 
struts/action2/trunk/core/src/test/java/org/apache/struts/action2/views/jsp/ui/SubmitTest.java
 (original)
+++ 
struts/action2/trunk/core/src/test/java/org/apache/struts/action2/views/jsp/ui/SubmitTest.java
 Thu May 18 18:37:26 2006
@@ -148,7 +148,7 @@
 tag.doStartTag();
 tag.doEndTag();
 
-assertEquals("mylabel", writer.toString().trim());
+assertEquals("mylabel", 
writer.toString().trim());
 }
 
 public void testSimpleThemeImageUsingActionOnly() throws Exception {
@@ -168,7 +168,7 @@
 tag.doStartTag();
 tag.doEndTag();
 
-assertEquals("mylabel", writer.toString().trim());
+assertEquals("mylabel", 
writer.toString().trim());
 }
 
 public void testSimpleThemeImageUsingMethodOnly() throws Exception {
@@ -188,7 +188,7 @@
 tag.doStartTag();
 tag.doEndTag();
 
-assertEquals("mylabel", writer.toString().trim());
+assertEquals("mylabel", 
writer.toString().trim());
 }
 
 public void testSimpleThemeInput() throws Exception {
@@ -207,7 +207,7 @@
 tag.doStartTag();
 tag.doEndTag();
 
-assertEquals("", writer.toString().trim());
+assertEquals("", writer.toString().trim());
 }
 
 /**




svn commit: r407683 - in /struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui: Submit-1.txt Submit-2.txt Submit-3.txt Submit-4.txt Submit-5.txt Submit-6.txt

2006-05-18 Thread tmjee
Author: tmjee
Date: Thu May 18 18:38:50 2006
New Revision: 407683

URL: http://svn.apache.org/viewvc?rev=407683&view=rev
Log:
- fixed failing test (due to newly added missing id attribute)

Modified:

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-1.txt

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-2.txt

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-3.txt

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-4.txt

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-5.txt

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-6.txt

Modified: 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-1.txt
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-1.txt?rev=407683&r1=407682&r2=407683&view=diff
==
--- 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-1.txt
 (original)
+++ 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-1.txt
 Thu May 18 18:38:50 2006
@@ -1,3 +1,3 @@
 
-
+
 

Modified: 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-2.txt
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-2.txt?rev=407683&r1=407682&r2=407683&view=diff
==
--- 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-2.txt
 (original)
+++ 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-2.txt
 Thu May 18 18:38:50 2006
@@ -1,3 +1,3 @@
 
-
+
 

Modified: 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-3.txt
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-3.txt?rev=407683&r1=407682&r2=407683&view=diff
==
--- 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-3.txt
 (original)
+++ 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-3.txt
 Thu May 18 18:38:50 2006
@@ -1,3 +1,3 @@
 
-bar
+bar
 

Modified: 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-4.txt
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-4.txt?rev=407683&r1=407682&r2=407683&view=diff
==
--- 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-4.txt
 (original)
+++ 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-4.txt
 Thu May 18 18:38:50 2006
@@ -1,3 +1,3 @@
 
-mylabel
+mylabel
 

Modified: 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-5.txt
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-5.txt?rev=407683&r1=407682&r2=407683&view=diff
==
--- 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-5.txt
 (original)
+++ 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-5.txt
 Thu May 18 18:38:50 2006
@@ -1,3 +1,3 @@
 
-
+
 

Modified: 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-6.txt
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-6.txt?rev=407683&r1=407682&r2=407683&view=diff
==
--- 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-6.txt
 (original)
+++ 
struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/Submit-6.txt
 Thu May 18 18:38:50 2006
@@ -1,3 +1,3 @@
 
-
+
 




svn commit: r408016 - in /struts/action2/trunk/core/src: main/java/org/apache/struts/action2/components/ main/java/org/apache/struts/action2/views/jsp/ui/ main/resources/META-INF/ main/resources/org/a

2006-05-20 Thread tmjee
Author: tmjee
Date: Sat May 20 09:11:06 2006
New Revision: 408016

URL: http://svn.apache.org/viewvc?rev=408016&view=rev
Log:
WW-1316


Added:

struts/action2/trunk/core/src/main/resources/org/apache/struts/action2/static/tree.css
   (with props)

struts/action2/trunk/core/src/test/java/org/apache/struts/action2/views/jsp/ui/Category.java
   (with props)

struts/action2/trunk/core/src/test/java/org/apache/struts/action2/views/jsp/ui/TreeTest.java
   (with props)

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/tree-1.txt
   (with props)

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/tree-2.txt
   (with props)
Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Tree.java

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/views/jsp/ui/TreeNodeTag.java

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/views/jsp/ui/TreeTag.java
struts/action2/trunk/core/src/main/resources/META-INF/taglib.tld
struts/action2/trunk/core/src/main/resources/template/ajax/tree.ftl
struts/action2/trunk/core/src/main/resources/template/ajax/treenode.ftl

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Tree.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Tree.java?rev=408016&r1=408015&r2=408016&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Tree.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Tree.java
 Sat May 20 09:11:06 2006
@@ -25,17 +25,34 @@
  * description="Render a tree widget."
  */
 public class Tree extends ClosingUIBean {
-private static final String TEMPLATE = "tree-close";
+
+   private static final String TEMPLATE = "tree-close";
 private static final String OPEN_TEMPLATE = "tree";
+
 private String toggle = "fade";
 private String treeSelectedTopic;
 private String treeExpandedTopic;
 private String treeCollapsedTopic;
-private String openAll;
 protected String rootNodeAttr;
 protected String childCollectionProperty;
 protected String nodeTitleProperty;
 protected String nodeIdProperty;
+private String showRootGrid;
+
+private String showGrid;
+private String blankIconSrc;
+   private String gridIconSrcL;
+   private String gridIconSrcV;
+   private String gridIconSrcP;
+   private String gridIconSrcC;
+   private String gridIconSrcX;
+   private String gridIconSrcY;
+   private String expandIconSrcPlus;
+   private String expandIconSrcMinus;
+   private String iconWidth;
+   private String iconHeight;
+   private String toggleDuration;
+private String templateCssPath;
 
 public Tree(OgnlValueStack stack, HttpServletRequest request, 
HttpServletResponse response) {
 super(stack, request, response);
@@ -75,8 +92,6 @@
 addParameter("treeCollapsedTopic", findString(treeCollapsedTopic));
 }
 
-addParameter("openAll", Boolean.valueOf(openAll));
-
 if (rootNodeAttr != null) {
 addParameter("rootNode", findValue(rootNodeAttr));
 }
@@ -92,6 +107,64 @@
 if (nodeIdProperty != null) {
 addParameter("nodeIdProperty", findString(nodeIdProperty));
 }
+
+if (showRootGrid != null) {
+   addParameter("showRootGrid", findValue(showRootGrid, 
Boolean.class));
+}
+
+
+if (showGrid != null) {
+   addParameter("showGrid", findValue(showGrid, Boolean.class));
+}
+
+if (blankIconSrc != null) {
+   addParameter("blankIconSrc", findString(blankIconSrc));
+}
+
+   if (gridIconSrcL != null) {
+   addParameter("gridIconSrcL", findString(gridIconSrcL));
+   }
+   
+   if (gridIconSrcV != null) {
+   addParameter("gridIconSrcV", findString(gridIconSrcV));
+   }
+   
+   if (gridIconSrcP != null)  {
+   addParameter("gridIconSrcP", findString(gridIconSrcP));
+   }
+   
+   if (gridIconSrcC != null) {
+   addParameter("gridIconSrcC", findString(gridIconSrcC));
+   }
+   
+   if (gridIconSrcX != null) {
+   addParameter("gridIconSrcX", findString(gridIconSrcX));
+   }
+   
+   if (gridIconSrcY != null) {
+   addParameter("gridIconSrcY", findString(gridIconSrcY));
+   }
+   
+   if (expandIconSrcPlus != null

svn commit: r408019 - in /struts/action2/trunk/apps/showcase/src/main: java/org/apache/struts/action2/showcase/ webapp/WEB-INF/ webapp/WEB-INF/classes/ webapp/tags/ui/

2006-05-20 Thread tmjee
Author: tmjee
Date: Sat May 20 09:14:37 2006
New Revision: 408019

URL: http://svn.apache.org/viewvc?rev=408019&view=rev
Log:
WW-1293


Added:

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/DynamicTreeSelectAction.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/ShowDynamicTreeAction.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/webapp/tags/ui/dynamicTreeSelect.jsp
   (with props)

struts/action2/trunk/apps/showcase/src/main/webapp/tags/ui/staticTreeSelect.jsp 
  (with props)

struts/action2/trunk/apps/showcase/src/main/webapp/tags/ui/treeExampleDynamic.jsp
   (with props)

struts/action2/trunk/apps/showcase/src/main/webapp/tags/ui/treeExampleStatic.jsp
   (with props)
Modified:

struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-tags-ui.xml
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators.xml
struts/action2/trunk/apps/showcase/src/main/webapp/tags/ui/index.jsp

Added: 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/DynamicTreeSelectAction.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/DynamicTreeSelectAction.java?rev=408019&view=auto
==
--- 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/DynamicTreeSelectAction.java
 (added)
+++ 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/DynamicTreeSelectAction.java
 Sat May 20 09:14:37 2006
@@ -0,0 +1,30 @@
+package org.apache.struts.action2.showcase;
+
+import org.apache.struts.action2.showcase.ajax.tree.Category;
+
+import com.opensymphony.xwork.ActionSupport;
+
+public class DynamicTreeSelectAction extends ActionSupport {
+
+   private long nodeId;
+   private Category currentCategory;
+   
+   
+   public void setNodeId(long nodeId) {
+   this.nodeId = nodeId;
+   }
+   public long getNodeId() {
+   return nodeId;
+   }
+   
+   
+   public String execute() throws Exception {
+   currentCategory = Category.getById(nodeId);
+   return SUCCESS;
+   }
+   
+   
+   public String getNodeName() {
+   return currentCategory.getName();
+   }
+}

Propchange: 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/DynamicTreeSelectAction.java
--
svn:eol-style = native

Added: 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/ShowDynamicTreeAction.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/ShowDynamicTreeAction.java?rev=408019&view=auto
==
--- 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/ShowDynamicTreeAction.java
 (added)
+++ 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/ShowDynamicTreeAction.java
 Sat May 20 09:14:37 2006
@@ -0,0 +1,14 @@
+package org.apache.struts.action2.showcase;
+
+import org.apache.struts.action2.showcase.ajax.tree.Category;
+
+import com.opensymphony.xwork.ActionSupport;
+
+
+public class ShowDynamicTreeAction extends ActionSupport {
+   
+   public Category getTreeRootNode() {
+   return Category.getById(1);
+   }
+}
+

Propchange: 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/ShowDynamicTreeAction.java
--
svn:eol-style = native

Modified: 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-tags-ui.xml
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-tags-ui.xml?rev=408019&r1=408018&r2=408019&view=diff
==
--- 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-tags-ui.xml
 (original)
+++ 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-tags-ui.xml
 Sat May 20 09:14:37 2006
@@ -36,5 +36,18 @@
 
tooltipExample.jsp
 
+
+   /tags/ui/treeExampleDynamic.jsp
+
+   
+   
+   
+
+
+   /tags/ui/staticTreeSelect.jsp
+
+
+   /tags/ui/dynamicTreeSelect.jsp
+
 
 

Modified: 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators.xml
URL: 
http://svn.apache.org/viewvc/struts/action2/trun

svn commit: r408026 - /struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Tree.java

2006-05-20 Thread tmjee
Author: tmjee
Date: Sat May 20 09:40:08 2006
New Revision: 408026

URL: http://svn.apache.org/viewvc?rev=408026&view=rev
Log:
updated javadoc example snippet


Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Tree.java

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Tree.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Tree.java?rev=408026&r1=408025&r2=408026&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Tree.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Tree.java
 Sat May 20 09:40:08 2006
@@ -17,9 +17,24 @@
  *
  * 
  * 
- * <tree .../>
+ * <-- statically --<
+ * <saf:tree rootNode="..." />
+ * 
+ * or 
+ * 
+ * <-- dynamically -->
+ * <saf:tree id="..." label="...">
+ *<saf:treenode id="..." label="..." />
+ *<saf:treenode id="..." label="...">
+ *<saf:treenode id="..." label="..." />
+ *<saf:treenode id="..." label="..." />
+ *&;lt;/saf:treenode>
+ *<saf:treenode id="..." label="..." />
+ * </saf:tree>
+ * 
  * 
  * 
+ * 
  *
  * @a2.tag name="tree" tld-body-content="JSP" 
tld-tag-class="org.apache.struts.action2.views.jsp.ui.TreeTag"
  * description="Render a tree widget."




svn commit: r408029 - /struts/action2/trunk/apps/showcase/src/main/webapp/tags/ui/treeExampleDynamic.jsp

2006-05-20 Thread tmjee
Author: tmjee
Date: Sat May 20 09:54:54 2006
New Revision: 408029

URL: http://svn.apache.org/viewvc?rev=408029&view=rev
Log:
- added snippet 


Modified:

struts/action2/trunk/apps/showcase/src/main/webapp/tags/ui/treeExampleDynamic.jsp

Modified: 
struts/action2/trunk/apps/showcase/src/main/webapp/tags/ui/treeExampleDynamic.jsp
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/tags/ui/treeExampleDynamic.jsp?rev=408029&r1=408028&r2=408029&view=diff
==
--- 
struts/action2/trunk/apps/showcase/src/main/webapp/tags/ui/treeExampleDynamic.jsp
 (original)
+++ 
struts/action2/trunk/apps/showcase/src/main/webapp/tags/ui/treeExampleDynamic.jsp
 Sat May 20 09:54:54 2006
@@ -7,6 +7,8 @@
 
 
 
+
+
 

svn commit: r408031 - /struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-tags-ui.xml

2006-05-20 Thread tmjee
Author: tmjee
Date: Sat May 20 09:55:19 2006
New Revision: 408031

URL: http://svn.apache.org/viewvc?rev=408031&view=rev
Log:
- added snippet


Modified:

struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-tags-ui.xml

Modified: 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-tags-ui.xml
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-tags-ui.xml?rev=408031&r1=408030&r2=408031&view=diff
==
--- 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-tags-ui.xml
 (original)
+++ 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-tags-ui.xml
 Sat May 20 09:55:19 2006
@@ -1,4 +1,9 @@
-http://www.opensymphony.com/xwork/xwork-1.1.1.dtd";>
+
+
+http://www.opensymphony.com/xwork/xwork-1.1.1.dtd";>
+   
 
 
 
@@ -36,11 +41,19 @@
 
tooltipExample.jsp
 
+
+
+
 
/tags/ui/treeExampleDynamic.jsp
 
+
+
+


+   
+   

 
 
@@ -50,4 +63,6 @@
/tags/ui/dynamicTreeSelect.jsp
 
 
+
+
 




svn commit: r408033 - /struts/action2/trunk/apps/showcase/src/main/webapp/tags/ui/treeExampleStatic.jsp

2006-05-20 Thread tmjee
Author: tmjee
Date: Sat May 20 09:55:57 2006
New Revision: 408033

URL: http://svn.apache.org/viewvc?rev=408033&view=rev
Log:
- added snippet


Modified:

struts/action2/trunk/apps/showcase/src/main/webapp/tags/ui/treeExampleStatic.jsp

Modified: 
struts/action2/trunk/apps/showcase/src/main/webapp/tags/ui/treeExampleStatic.jsp
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/tags/ui/treeExampleStatic.jsp?rev=408033&r1=408032&r2=408033&view=diff
==
--- 
struts/action2/trunk/apps/showcase/src/main/webapp/tags/ui/treeExampleStatic.jsp
 (original)
+++ 
struts/action2/trunk/apps/showcase/src/main/webapp/tags/ui/treeExampleStatic.jsp
 Sat May 20 09:55:57 2006
@@ -6,6 +6,8 @@
 
 
 
+
+
 

svn commit: r408035 - /struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Tree.java

2006-05-20 Thread tmjee
Author: tmjee
Date: Sat May 20 09:57:33 2006
New Revision: 408035

URL: http://svn.apache.org/viewvc?rev=408035&view=rev
Log:
- added apache license at the top


Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Tree.java

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Tree.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Tree.java?rev=408035&r1=408034&r2=408035&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Tree.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/Tree.java
 Sat May 20 09:57:33 2006
@@ -1,3 +1,20 @@
+/*
+ * $Id$
+ *
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.struts.action2.components;
 
 import com.opensymphony.xwork.util.OgnlValueStack;




svn commit: r408036 - /struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/ShowDynamicTreeAction.java

2006-05-20 Thread tmjee
Author: tmjee
Date: Sat May 20 09:59:30 2006
New Revision: 408036

URL: http://svn.apache.org/viewvc?rev=408036&view=rev
Log:
- added snippet


Modified:

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/ShowDynamicTreeAction.java

Modified: 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/ShowDynamicTreeAction.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/ShowDynamicTreeAction.java?rev=408036&r1=408035&r2=408036&view=diff
==
--- 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/ShowDynamicTreeAction.java
 (original)
+++ 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/ShowDynamicTreeAction.java
 Sat May 20 09:59:30 2006
@@ -4,6 +4,7 @@
 
 import com.opensymphony.xwork.ActionSupport;
 
+// START SNIPPET: treeExampleDynamicJavaShow 
 
 public class ShowDynamicTreeAction extends ActionSupport {

@@ -11,4 +12,6 @@
return Category.getById(1);
}
 }
+
+// END SNIPPET: treeExampleDynamicJavaShow
 




svn commit: r408037 - /struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/DynamicTreeSelectAction.java

2006-05-20 Thread tmjee
Author: tmjee
Date: Sat May 20 10:00:14 2006
New Revision: 408037

URL: http://svn.apache.org/viewvc?rev=408037&view=rev
Log:
- added snippet


Modified:

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/DynamicTreeSelectAction.java

Modified: 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/DynamicTreeSelectAction.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/DynamicTreeSelectAction.java?rev=408037&r1=408036&r2=408037&view=diff
==
--- 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/DynamicTreeSelectAction.java
 (original)
+++ 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/DynamicTreeSelectAction.java
 Sat May 20 10:00:14 2006
@@ -4,6 +4,8 @@
 
 import com.opensymphony.xwork.ActionSupport;
 
+//START SNIPPET: treeExampleDynamicJavaSelected
+
 public class DynamicTreeSelectAction extends ActionSupport {
 
private long nodeId;
@@ -28,3 +30,6 @@
return currentCategory.getName();
}
 }
+
+//START SNIPPET: treeExampleDynamicJavaSelected
+




svn commit: r408150 - in /struts/action2/trunk/core/src: main/java/org/apache/struts/action2/dispatcher/StrutsResultSupport.java test/java/org/apache/struts/action2/dispatcher/StrutsResultSupportTest.

2006-05-21 Thread tmjee
Author: tmjee
Date: Sun May 21 02:16:25 2006
New Revision: 408150

URL: http://svn.apache.org/viewvc?rev=408150&view=rev
Log:
WW-1315


Added:

struts/action2/trunk/core/src/test/java/org/apache/struts/action2/dispatcher/StrutsResultSupportTest.java
   (with props)
Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/StrutsResultSupport.java

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/StrutsResultSupport.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/StrutsResultSupport.java?rev=408150&r1=408149&r2=408150&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/StrutsResultSupport.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/StrutsResultSupport.java
 Sun May 21 02:16:25 2006
@@ -17,6 +17,11 @@
  */
 package org.apache.struts.action2.dispatcher;
 
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.struts.action2.StrutsStatics;
 import com.opensymphony.xwork.ActionInvocation;
 import com.opensymphony.xwork.Result;
@@ -24,6 +29,8 @@
 
 
 /**
+ * 
+ * 
  * A base class for all Struts action execution results.
  * The "location" param is the default parameter, meaning the most common 
usage of this result would be:
  * 
@@ -34,7 +41,18 @@
  * [EMAIL PROTECTED] TextParseUtil#translateVariables(java.lang.String, 
com.opensymphony.xwork.util.OgnlValueStack) translateVariables}
  * method
  * parse - true by default. If set to false, the location param will not 
be parsed for expressions
+ * encode - false by default. If set to false, the location param will not 
be url encoded. This only have effect when parse is true
  * 
+ * 
+ * NOTE:
+ * The encode param will only have effect when parse is true
+ * 
+ * 
+ * 
+ * 
+ * 
+ * 
+ * 
  * 
  * In the xwork.xml configuration file, these would be included as:
  * 
@@ -48,7 +66,8 @@
  * 
  *  <result name="success" type="redirect" >
  *  <param name="location">foo.jsp</param>
- *  <param name="parse">false</param>
+ *  <param name="parse">true</param>
+ *  <param name="encode">false</param>
  *  </result>
  * 
  * or when using the default parameter feature
@@ -70,12 +89,18 @@
  * 
  * Please see the [EMAIL PROTECTED] com.opensymphony.xwork.Result} class for 
more info on Results in general.
  *
+ * 
+ * 
  * @see com.opensymphony.xwork.Result
  */
 public abstract class StrutsResultSupport implements Result, StrutsStatics {
+   
+   private static final Log _log = 
LogFactory.getLog(StrutsResultSupport.class);
+   
 public static final String DEFAULT_PARAM = "location";
 
 protected boolean parse = true;
+protected boolean encode = false;
 protected String location;
 
 /**
@@ -99,6 +124,16 @@
 public void setParse(boolean parse) {
 this.parse = parse;
 }
+
+/**
+ * Set encode to true to indicate that the location should be url 
encoded. This is set to
+ * true by default
+ * 
+ * @param encode true if the location parameter should be url 
encode, false otherwise.
+ */
+public void setEncode(boolean encode) {
+   this.encode = encode;
+}
 
 /**
  * Implementation of the execute method from the Result 
interface. This will call
@@ -114,9 +149,26 @@
 
 protected String conditionalParse(String param, ActionInvocation 
invocation) {
 if (parse && param != null && invocation != null) {
-return TextParseUtil.translateVariables(param, 
invocation.getStack());
+return TextParseUtil.translateVariables(param, 
invocation.getStack(), 
+   new TextParseUtil.ParsedValueEvaluator() {
+   public Object evaluate(Object 
parsedValue) {
+   if (encode) {
+   if (parsedValue 
!= null) {
+   try {
+   
// use UTF-8 as this is the recommended encoding by W3C to 
+   
// avoid incompatibilities.
+   
return URLEncoder.encode(parsedValue.toString(), "UTF-8");
+   }
+

svn commit: r408151 - /struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/StrutsResultSupport.java

2006-05-21 Thread tmjee
Author: tmjee
Date: Sun May 21 02:29:01 2006
New Revision: 408151

URL: http://svn.apache.org/viewvc?rev=408151&view=rev
Log:
- update snippet/javadoc to show usage of parse and encode result
  parameters.


Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/StrutsResultSupport.java

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/StrutsResultSupport.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/StrutsResultSupport.java?rev=408151&r1=408150&r2=408151&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/StrutsResultSupport.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/StrutsResultSupport.java
 Sun May 21 02:29:01 2006
@@ -65,10 +65,13 @@
  * 
  * 
  *  <result name="success" type="redirect" >
- *  <param name="location">foo.jsp</param>
+ *  <param name="location">foo.jsp?url=${myUrl}</param>
  *  <param name="parse">true</param>
- *  <param name="encode">false</param>
+ *  <param name="encode">true</param>
  *  </result>
+ * 
+ * In the above case, myUrl will be parsed against Ognl Value Stack and then 
+ * URL encoded.
  * 
  * or when using the default parameter feature
  * 




svn commit: r408152 - /struts/action2/trunk/build.xml

2006-05-21 Thread tmjee
Author: tmjee
Date: Sun May 21 02:48:36 2006
New Revision: 408152

URL: http://svn.apache.org/viewvc?rev=408152&view=rev
Log:
- in xdoclet-tagdoc task, added overwrite="true" for the copy task


Modified:
struts/action2/trunk/build.xml

Modified: struts/action2/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/build.xml?rev=408152&r1=408151&r2=408152&view=diff
==
--- struts/action2/trunk/build.xml (original)
+++ struts/action2/trunk/build.xml Sun May 21 02:48:36 2006
@@ -156,7 +156,7 @@
 
 
 
-
+
 
 
 




svn commit: r408153 [10/10] - in /struts/action2/trunk/docs: ./ tags/

2006-05-21 Thread tmjee
Added: struts/action2/trunk/docs/tags/index.html
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/docs/tags/index.html?rev=408153&view=auto
==
--- struts/action2/trunk/docs/tags/index.html (added)
+++ struts/action2/trunk/docs/tags/index.html Sun May 21 02:52:46 2006
@@ -0,0 +1,567 @@
+
+
+Struts Action 2 2.0-dev Taglib Index
+
+
+
+
+Struts Action 2 2.0-dev Taglib Index
+
+
+
+
+
+
+
+
+
+Render a up down select element
+
+
+
+
+
+
+
+ + + +Renders an input form + + + + + + + + + + +Render a custom ui widget + + + + + + + + + + +Render a checkbox input field + + + + + + + + + + +Iterate over a iterable value + + + + + + + + + + +Render a file input field + + + + + + + + + + +Assigns a value to a variable in a specified scope + + + + + + + + + + +Parametrize other tags + + + + + + + + + + +Render a tree widget. + + + + + + + + + + +Renders two HTML select elements with second one changing displayed values depending on selected entry of first one. + + + + + + + + + + +Else tag + + + + + + + + + + +Render a rich text editor element + + + + + + + + + + +Elseif tag + + + + + + + + + + +Render a submit button + + + + + + + + + + +Push value on stack for simplified usage. + + + + + + + + + + +Print out expression which evaluates against the stack + + + + + + + + + + +Render a formatted date. + + + + + + + + + + +This tag is used to create a URL + + + + + + + + + + +Render a hidden input field + + + + + + + + + + +Stop double-submission of forms + + + + + + + + + + +Render field error (all or partial depending on param tag nested)if they exists + + + + + + + + + + +Get a resource bundle and place it on the value stack + + + + + + + + + + +Render action messages if they exists + + + + + + + + + + +Append the values of a list of iterators to one iterator + + + + + + +
+ + + +Render HTML div providing content from remote call via AJAX + + + + + + + + + + +Execute an action from within a view + + + + + + + + + + +Render a I18n text message. + + + + + + + + + + +Render a tabbedPanel widget. + + + + + + + + + + +Render an HTML input tag of type password + + + + + + + + + + +Renders an input form + + + + + + +