svn commit: r432808 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java

2006-08-19 Thread tmjee
Author: tmjee
Date: Sat Aug 19 00:16:37 2006
New Revision: 432808

URL: http://svn.apache.org/viewvc?rev=432808&view=rev
Log:
WW-1340
  - added javadoc (documenting a custom Dispatcher could be used by having 
subclass overrides the createDispatcher() method)

Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java?rev=432808&r1=432807&r2=432808&view=diff
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
 Sat Aug 19 00:16:37 2006
@@ -107,6 +107,9 @@
  * database access credentials.
  *
  * 
+ * 
+ * To use a custom [EMAIL PROTECTED] Dispatcher}, the 
createDispatcher() method could be overriden by 
+ * the subclass.
  *
  * @see org.apache.struts2.lifecycle.LifecycleListener
  * @see ActionMapper




svn commit: r432874 - /struts/site/src/site/xdoc/announce.xml

2006-08-19 Thread wsmoak
Author: wsmoak
Date: Sat Aug 19 13:43:12 2006
New Revision: 432874

URL: http://svn.apache.org/viewvc?rev=432874&view=rev
Log:
Added Struts 1.3.5 to the announcements page.

Modified:
struts/site/src/site/xdoc/announce.xml

Modified: struts/site/src/site/xdoc/announce.xml
URL: 
http://svn.apache.org/viewvc/struts/site/src/site/xdoc/announce.xml?rev=432874&r1=432873&r2=432874&view=diff
==
--- struts/site/src/site/xdoc/announce.xml (original)
+++ struts/site/src/site/xdoc/announce.xml Sat Aug 19 13:43:12 2006
@@ -30,6 +30,78 @@
 Skip to: Announcements - 2005
 
 
+18 Aug 2006 - Struts v1.3.5 Beta
+
+The Apache Struts team is pleased to announce the release of 
Struts 1.3.5 Beta.
+
+Struts 1.3.5 is available in a full distribution, or as 
separate library, source, example and
+documentation distributions.
+
+http://struts.apache.org/download.cgi#struts135
+
+It is also available in the central Maven repository under 
Group ID "org.apache.struts".
+
+Major changes since Struts 1.2 include
+
+
+Composable Request Processor
+Arbitrary configuration properties
+Opt-In Cancel Handling
+Enhanced Global Exception Handlers
+Extends attribute
+"isCommitted" Exception Handling
+Postback Actions
+Wildcard ActionConfig properties
+
+
+Composable Request Processor: For Struts 1.3, we turned the 
request processor methods into Commands that
+are part of a flexible Chain of Commands.
+
+Arbitrary configuration properties: Most every Struts 
configuration element now accepts a map of
+key/value pairs. Arbitrary configuration properties let us 
externalize more of our configurations,
+encouraging reuse.
+
+Opt-In Cancel Handling: In Struts 1.3, the Cancel token is only 
honored if the new property "cancellable"
+is set for the Action Mapping. If the Cancel token is present, 
but cancellable is not set, then an
+InvalidCancelException is thrown. The InvalidCancelExeption 
may be caught by a Declarative Exception
+Handler, like any other Exception.
+
+Enhanced Global Exception Handlers: We now support use of 
global exception handlers in cases when no
+ActionConfig has yet been identified, as in with 
"preprocessing" commands in a custom request processing
+chain.
+
+Extends attribute: In the Struts configuration file, we can now 
use the extends attribute to adopt
+default settings from another element, as we already can in 
the Tiles configuration files.
+
+"isCommitted" Exception Handling: When using Tiles, sometimes 
the response is already committed when an
+exception occurs. Now, the ExceptionHandler tests 
response.isCommitted, and, if true, includes the
+configured view path, rather than forwarding to it.
+
+Postback Forms: The action attribute of the Form taglib is now 
optional. If omitted, the original URI of
+the original request is used.
+
+Wildcard ActionConfig properties: Wildcards can now be used in 
the properties of an ActionConfig.
+
+The 1.3.x series of the Apache Struts framework has a minumum 
requirement of the following specification
+versions:
+
+
+Java Servlet 2.3 and JavaServer Pages (JSP) 1.2
+Java 2 Standard Platform Edition (J2SE) 1.4
+
+
+The release notes are available online at:
+
+http://struts.apache.org/1.x/userGuide/release-notes.html";>
+
http://struts.apache.org/1.x/userGuide/release-notes.html
+
+Notes on upgrading from prior versions can be found on the 
community-maintained wiki:
+
+http://wiki.apache.org/struts/StrutsUpgradeNotes12to13";>
+http://wiki.apache.org/struts/StrutsUpgradeNotes12to13
+
+
+
 28 Jun 2006 - Shale to Become Top-Level
 ASF Project
 




svn commit: r432875 - /struts/current/STATUS.txt

2006-08-19 Thread wsmoak
Author: wsmoak
Date: Sat Aug 19 13:48:00 2006
New Revision: 432875

URL: http://svn.apache.org/viewvc?rev=432875&view=rev
Log:
Added recent votes and fixed links to JIRA and ViewVC.

Modified:
struts/current/STATUS.txt

Modified: struts/current/STATUS.txt
URL: 
http://svn.apache.org/viewvc/struts/current/STATUS.txt?rev=432875&r1=432874&r2=432875&view=diff
==
--- struts/current/STATUS.txt (original)
+++ struts/current/STATUS.txt Sat Aug 19 13:48:00 2006
@@ -1,10 +1,10 @@
 APACHE STRUTS PROJECT STATUS:
 
 Web site: http://struts.apache.org/
-Moin Mon Wiki: http://wiki.apache.org/struts/
+Moin Moin Wiki: http://wiki.apache.org/struts/
 Mailing Lists: http://struts.apache.org/mail.html
-Issue Tracking: http://issues.apache.org/bugzilla/
-Source Code: http://svn.apache.org/viewcvs.cgi/struts/
+JIRA Issue Tracking: http://issues.apache.org/struts/
+Source Code: http://svn.apache.org/viewvc/struts/
 Announcements: http://struts.apache.org/announce.html
 
 PMC Members
@@ -144,8 +144,17 @@
 
 2006 PROJECT VOTES AND DECISIONS
 
+Struts v1.3.5 Quality
+* [17 Aug 2006] +2 GA (binding), +2 Beta (binding), +2 GA (non-binding)
+
+Release the struts-master pom v3
+* [24 July 2006] +1 3 (binding)
+
+Struts Action Framework v1.3.4 Quality
+* [13 May 2006] +4 Beta (binding), +2 GA (binding)
+
 Struts Action Framework v1.3.3 Quality
-* [8 May 2006] (pending)
+* [8 May 2006] Withdrawn due to incorrect jar file manifests.
 
 Release the struts-parent pom v2
 * [6 May 2006] +1 6 (binding)
@@ -546,4 +555,4 @@
 
Approved by Unanimous Vote.
 
-
\ No newline at end of file
+




svn commit: r432886 [3/3] - in /struts/struts2/trunk: ant-build/ apps/mailreader/src/main/java/mailreader2/ apps/mailreader/src/main/java/mailreader2/registration/ apps/mailreader/src/main/java/mailre

2006-08-19 Thread husted
Modified: 
struts/struts2/trunk/core/src/main/resources/template/simple/timepicker.ftl
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/timepicker.ftl?rev=432886&r1=432885&r2=432886&view=diff
==
--- struts/struts2/trunk/core/src/main/resources/template/simple/timepicker.ftl 
(original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/timepicker.ftl 
Sat Aug 19 15:03:04 2006
@@ -16,7 +16,7 @@
 <#if parameters.timeIconPath?exists>
 iconPath="${parameters.timeIconPath}"
 <#else>
-   iconPath="<@saf.url includeParams='none' 
value='/struts/dojo/struts/widgets/timeIcon.gif' encode='false' 
includeParams="none" />"
+   iconPath="<@s.url includeParams='none' 
value='/struts/dojo/struts/widgets/timeIcon.gif' encode='false' 
includeParams="none" />"
 
 <#if parameters.templatePath?exists>
 templatePath="${parameters.templatePath}"

Modified: 
struts/struts2/trunk/core/src/main/resources/template/simple/updownselect.ftl
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/updownselect.ftl?rev=432886&r1=432885&r2=432886&view=diff
==
--- 
struts/struts2/trunk/core/src/main/resources/template/simple/updownselect.ftl 
(original)
+++ 
struts/struts2/trunk/core/src/main/resources/template/simple/updownselect.ftl 
Sat Aug 19 15:03:04 2006
@@ -1,5 +1,5 @@
 <#if !stack.findValue("#optiontransferselect_js_included")?exists><#t/>
-   ">
+   ">
<#assign temporaryVariable = 
stack.setValue("#optiontransferselect_js_included", "true") /><#t/>
 <#t/>
 

Modified: 
struts/struts2/trunk/core/src/main/resources/template/xhtml/checkbox.ftl
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/checkbox.ftl?rev=432886&r1=432885&r2=432886&view=diff
==
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/checkbox.ftl 
(original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/checkbox.ftl 
Sat Aug 19 15:03:04 2006
@@ -66,7 +66,7 @@
 
 :<#t/>
 <#if parameters.tooltip?exists>
-
+
 
 <#t/>
 
@@ -76,7 +76,7 @@
 *<#t/>
 
 <#if parameters.tooltip?exists>
-
+
 
 
 

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/head.ftl
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/head.ftl?rev=432886&r1=432885&r2=432886&view=diff
==
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/head.ftl 
(original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/head.ftl Sat 
Aug 19 15:03:04 2006
@@ -1,2 +1,2 @@
-" type="text/css"/>
+" type="text/css"/>
 <#include "/${parameters.templateDir}/simple/head.ftl" />

Modified: 
struts/struts2/trunk/core/src/main/resources/template/xhtml/tooltip.ftl
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/tooltip.ftl?rev=432886&r1=432885&r2=432886&view=diff
==
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/tooltip.ftl 
(original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/tooltip.ftl Sat 
Aug 19 15:03:04 2006
@@ -2,9 +2,9 @@
  <#assign tooltipHashCode=parameters.tooltip.hashCode() />
   <#t/>
-   src='<@saf.url value="${parameters.tooltipIcon}" />' 
+   src='<@s.url value="${parameters.tooltipIcon}" />'
   <#else><#t/>
-   src='<@saf.url value="/struts/dojo/struts/tooltip.gif" />'
+   src='<@s.url value="/struts/dojo/struts/tooltip.gif" />'
   <#t/>
alt="${parameters.tooltip?html}" 
title="${parameters.tooltip?html}" />

Modified: 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java?rev=432886&r1=432885&r2=432886&view=diff
==
--- 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java
 (original)
+++ 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java
 Sat Aug 19 15:03:04 2006
@@ -378,8 +378,8 @@
 }
 
 public void testGetUriFromActionMapper12() throws Exception {
-String old = 
org.apache.struts2.config.Settings.get(StrutsConstants.STRUTS_COMPATIBILITY_MODE);
-
org.apache.struts2.config.Settings.set(StrutsConstants.STRUTS

svn commit: r432899 - in /struts/struts2/trunk/core/src/main/java/org/apache/struts2/views: freemarker/FreemarkerResult.java jsp/iterator/IteratorGeneratorTag.java jsp/iterator/SortIteratorTag.java js

2006-08-19 Thread husted
Author: husted
Date: Sat Aug 19 16:36:37 2006
New Revision: 432899

URL: http://svn.apache.org/viewvc?rev=432899&view=rev
Log:
WW-1340 Update Javadocs, constants, and such. No functional changes.

Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerResult.java

struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java

struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SortIteratorTag.java

struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerResult.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerResult.java?rev=432899&r1=432898&r2=432899&view=diff
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerResult.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerResult.java
 Sat Aug 19 16:36:37 2006
@@ -90,7 +90,7 @@
 protected ObjectWrapper wrapper;
 
 /*
- * Struts results are constructed for each result execeution
+ * Struts results are constructed for each result execution
  *
  * the current context is availible to subclasses via these protected 
fields
  */

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java?rev=432899&r1=432898&r2=432899&view=diff
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java
 Sat Aug 19 16:36:37 2006
@@ -52,22 +52,22 @@
  * Example One:
  * 
  * Generate a simple iterator
- * 
- * 
- * 
- *
- *
+ * + * + *
+ *
+ *
* * This generates an iterator and print it out using the iterator tag. * * Example Two: * * Generate an iterator with count attribute - * - * - *
- *
- *
+ * + * + *
+ *
+ *
* * This generates an iterator, but only 3 entries will be available in the iterator * generated, namely aaa, bbb and ccc respectively because count attribute is set to 3 @@ -75,7 +75,7 @@ * Example Three: * * Generate an iterator with id attribute - * + * * <% * Iterator i = (Iterator) pageContext.getAttribute("myAtt"); * while(i.hasNext()) { @@ -91,11 +91,11 @@ * Example Four: * * Generate an iterator with comparator attribute - * - * - *
- *
- *
+ * + * + *
+ *
+ *
* * * public class GeneratorTagAction extends ActionSupport { Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SortIteratorTag.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SortIteratorTag.java?rev=432899&r1=432898&r2=432899&view=diff == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SortIteratorTag.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SortIteratorTag.java Sat Aug 19 16:36:37 2006 @@ -55,15 +55,15 @@ * * * USAGE 1: - * - * + * + * * - * - * - *

svn commit: r432904 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.html

2006-08-19 Thread husted
Author: husted
Date: Sat Aug 19 16:48:14 2006
New Revision: 432904

URL: http://svn.apache.org/viewvc?rev=432904&view=rev
Log:
WW-1340 The current snippets assume that the HTML Javadocs are being checked in 
at trunk/docs. This checkin is a test of keeping the Javadoc and Java source 
together. 

Added:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.html

Added: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.html
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.html?rev=432904&view=auto
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.html
 (added)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.html
 Sat Aug 19 16:48:14 2006
@@ -0,0 +1,567 @@
+http://www.w3.org/TR/html4/loose.dtd";>
+
+
+
+
+
+SubsetIteratorTag (Struts 2 API - 2.0-dev)
+
+
+
+
+
+
+
+function windowTitle()
+{
+parent.document.title="SubsetIteratorTag (Struts 2 API - 2.0-dev)";
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+  Overview 
+  Package 
+    Class 
+  Use 
+  Tree 
+  Deprecated 
+  Index 
+  Help 
+  
+
+
+
+
+
+
+
+
+
+ PREV 
CLASS 
+ NEXT CLASS
+
+  FRAMES   
+ NO FRAMES  
 
+ 
+  
+
+
+  All Classes
+
+
+
+
+
+
+
+  SUMMARY: NESTED | FIELD | CONSTR | METHOD
+
+DETAIL: FIELD | CONSTR | METHOD
+
+
+
+
+
+
+
+
+
+org.apache.struts2.views.jsp.iterator
+
+Class SubsetIteratorTag
+
+http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html"; 
title="class or interface in java.lang">java.lang.Object
+  javax.servlet.jsp.tagext.TagSupport
+  javax.servlet.jsp.tagext.BodyTagSupport
+  org.apache.struts2.views.jsp.StrutsBodyTagSupport
+  org.apache.struts2.views.jsp.iterator.SubsetIteratorTag
+
+
+All Implemented Interfaces: http://java.sun.com/j2se/1.5/docs/api/java/io/Serializable.html"; 
title="class or interface in java.io">Serializable, 
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, 
javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
+
+
+
+public class SubsetIteratorTagextends StrutsBodyTagSupport
+
+
+
+
+ NOTE: JSP-TAG
+ 
+ A tag that takes an iterator and outputs a subset of it. It delegates to
+ SubsetIteratorFilter 
internally to
+ perform the subset functionality.
+ 
+
+ 
+ 
+count (Object) - Indicate the number of entries to be in 
the resulting subset iterator
+source* (Object) - Indicate the source of which the 
resulting subset iterator is to be derived base on
+start (Object) - Indicate the starting index (eg. first 
entry is 0) of entries in the source to be available as the first entry in the 
resulting subset iterator
+decider (Object) - Extension to plug-in a decider to 
determine if that particular entry is to be included in the resulting subset 
iterator
+id (String) - Indicate the pageContext attribute id to 
store the resultant subset iterator in
+ 
+ 
+
+
+ 
+ 
+ public class MySubsetTagAction extends ActionSupport {
+  public String execute() throws Exception {
+   l = new ArrayList();
+   l.add(new Integer(1));
+   l.add(new Integer(2));
+   l.add(new Integer(3));
+   l.add(new Integer(4));
+   l.add(new Integer(5));
+   return "done";
+}
+
+
+public Integer[] getMyArray() {
+   return a;
+}
+
+public List getMyList() {
+   return l;
+ }
+
+  public Decider getMyDecider() {
+return new Decider() {
+public boolean decide(Object element) throws Exception 
{
+int i = ((Integer)element).intValue();
+return (((i % 2) == 0)?true:false);
+}
+};
+}
+}
+ 
+ 
+
+
+ 
+ 
+ 
+
+ 
+
+ 
+
+ 
+ 
+
+ 
+ 
+ 
+
+ 
+ 
+ 
+ 
+ 
+ 
+
+ 
+ 
+ 
+  
+   
+ 
+   
+  
+ 
+ 
+
+ 
+ 
+ 

svn commit: r432926 - in /struts/struts2/trunk: core/src/main/java/org/apache/struts2/components/If.java core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.html pom.xml

2006-08-19 Thread husted
Author: husted
Date: Sat Aug 19 19:33:00 2006
New Revision: 432926

URL: http://svn.apache.org/viewvc?rev=432926&view=rev
Log:
WW-1340 Add target for taglib plugin

Removed:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.html
Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/If.java
struts/struts2/trunk/pom.xml

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/If.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/If.java?rev=432926&r1=432925&r2=432926&view=diff
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/If.java 
(original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/If.java 
Sat Aug 19 19:33:00 2006
@@ -48,8 +48,8 @@
  *  
  * 
  * 
Will Be Executed
- *
* + * *
Will Not Be Executed
*
* Modified: struts/struts2/trunk/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/pom.xml?rev=432926&r1=432925&r2=432926&view=diff == --- struts/struts2/trunk/pom.xml (original) +++ struts/struts2/trunk/pom.xml Sat Aug 19 19:33:00 2006 @@ -216,6 +216,11 @@ org.apache.maven.plugins maven-project-info-reports-plugin + +net.sourceforge.maven-taglib +maven-taglib-plugin + 2.2.1 + maven-javadoc-plugin 2.0 @@ -307,28 +312,28 @@ http://maven.opensymphony.com - - Maven Snapshots - http://snapshots.maven.codehaus.org/maven2/ - - true - - - false - - + +Maven Snapshots +http://snapshots.maven.codehaus.org/maven2/ + + true + + + false + + - - - Maven Snapshots - http://snapshots.maven.codehaus.org/maven2/ - - true - - - false - - - + + +Maven Snapshots +http://snapshots.maven.codehaus.org/maven2/ + + true + + + false + + +

svn commit: r432943 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java main/resources/struts-default.xml test/java/org/apache/struts2/intercepto

2006-08-19 Thread tmjee
Author: tmjee
Date: Sat Aug 19 22:41:25 2006
New Revision: 432943

URL: http://svn.apache.org/viewvc?rev=432943&view=rev
Log:
WW-731
  - Add the capability to automatically save messages between Actions


Added:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java

struts/struts2/trunk/core/src/test/java/org/apache/struts2/interceptor/MessageStoreInterceptorTest.java
Modified:
struts/struts2/trunk/core/src/main/resources/struts-default.xml

Added: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java?rev=432943&view=auto
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java
 (added)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java
 Sat Aug 19 22:41:25 2006
@@ -0,0 +1,331 @@
+/*
+ * $Id: FileUploadInterceptor.java 421776 2006-07-14 00:47:56Z tmjee $
+ *
+ * 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.struts2.interceptor;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.ValidationAware;
+import com.opensymphony.xwork2.interceptor.Interceptor;
+
+/**
+ * 
+ * 
+ * An interceptor to store [EMAIL PROTECTED] ValidationAware} action's 
messages / errors and field errors into 
+ * Http Session, such that it will be retrieveable at a later stage. This 
allows the action's message /
+ * errors and field errors to be available longer that just the particular 
http request.
+ * 
+ * 
+ * 
+ * In the 'STORE' mode, the interceptor will store the [EMAIL PROTECTED] 
ValidationAware} action's message / errors 
+ * and field errors into Http session.
+ * 
+ * 
+ * 
+ * In the 'RETRIEVE' mode, the interceptor will retrieve the stored action's 
message / errors  and field
+ * errors and put them back into the [EMAIL PROTECTED] ValidationAware} action.
+ * 
+ * 
+ * 
+ * The interceptor does nothing in the 'NONE' mode, which is the default.
+ * 
+ * 
+ * 
+ * The operation mode could be switched using :- 
+ * 1] Setting the iterceptor parameter eg.
+ * 
+ *   
+ *  
+ * l;STORE
+ *  
+ *  
+ *  
+ *   
+ * 
+ * 
+ * 2] Through request parameter (allowRequestParameterSwitch must be 'true' 
which is the default)
+ * 
+ *   // the request will have the operation mode in 'STORE'
+ *   http://localhost:8080/context/submitApplication.action?operationMode=STORE
+ * 
+ * 
+ * 
+ * 
+ * 
+ * 
+ * 
+ * 
+ * allowRequestParameterSwitch - To enable request parameter 
that could switch the operation mode 
+ * 
  of this interceptor. 
+ * requestParameterSwitch - The request parameter that will 
indicate what mode this 
+ *  
interceptor is in. 
+ * operationMode - The operation mode this interceptor should 
be in 
+ * (either 'STORE', 
'RETRIEVE' or 'NONE'). 'NONE' being the default.
+ * 
+ * 
+ * 
+ * 
+ * 
+ * 
+ * 
+ * 
+ * The following method could be overriden :-
+ * 
+ * getRequestOperationMode - get the operation mode of this 
interceptor based on the request parameters
+ *  mergeCollection - merge two collections
+ *  mergeMap - merge two map
+ * 
+ * 
+ * 
+ * 
+ * 
+ * 
+ * 
+ * 
+ *
+ * STORE
+ *
+ *
+ *applicationFailed.action
+ *applicationSuccess.jsp