Author: tmjee
Date: Fri Sep  8 11:04:50 2006
New Revision: 441596

URL: http://svn.apache.org/viewvc?view=rev&rev=441596
Log:
WW-1340
  - updated javadoc with example and description of request parameter passing 
in a redirect-action result type


Modified:
    
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java?view=diff&rev=441596&r1=441595&r2=441596
==============================================================================
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java
 Fri Sep  8 11:04:50 2006
@@ -40,6 +40,23 @@
  * configuration files. This means you can change your URL patterns at any 
point and your application will still work.
  * It is strongly recommended that if you are redirecting to another action, 
you use this result rather than the
  * standard redirect result.
+ * 
+ * <p/>
+ * 
+ * To pass parameters, the &lt;param&gt; ... &lt;/param&gt; tag. The following 
parameters will not be 
+ * passable becuase they are part of the config param for this particular 
result.
+ * 
+ * <ul>
+ *     <li>actionName</li>
+ *  <li>namespace</li>
+ *  <li>method</li>
+ *  <li>encode</li>
+ *  <li>parse</li>
+ *  <li>location</li>
+ *  <li>prependServletContext</li>
+ * </ul>
+ * 
+ * See examples below for an example of how request parameters could be passed 
in.
  *
  * <!-- END SNIPPET: description -->
  *
@@ -82,6 +99,25 @@
  *         &lt;result&gt;error.jsp&lt;/result&gt;
  *     &lt;/action&gt;
  * &lt;/package&gt;
+ * 
+ * &lt;package name="passingRequestParameters" extends="webwork-default" 
namespace="/passingRequestParameters"&gt;
+ *       &lt;-- Pass parameters (reportType, width and height) --&gt;
+ *    &lt;!-- 
+ *    The redirect-action url generated will be : 
+ *    /genReport/generateReport.action?reportType=pie&width=100&height=100
+ *    --&gt;
+ *    &lt;action name="gatherReportInfo" class="..."&gt;
+ *       &lt;result name="showReportResult" type="redirect-action"&gt;
+ *             &lt;param name="actionName"&gt;generateReport&lt;/param&gt;
+ *          &lt;param name="namespace="&gt;/genReport&lt;/param&gt;
+ *          &lt;param name="reportType"&gt;pie&lt;/param&gt;
+ *          &lt;param name="width"&gt;100&lt;/param&gt;
+ *          &lt;param name="height"&gt;100&lt;/param&gt;
+ *       &lt;/result&gt;
+ *    &lt;/action&gt;
+ * &lt;/package&gt;
+ * 
+ * 
  * <!-- END SNIPPET: example --></pre>
  *
  * @see ActionMapper


Reply via email to