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 <param> ... </param> 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 @@ * <result>error.jsp</result> * </action> * </package> + * + * <package name="passingRequestParameters" extends="webwork-default" namespace="/passingRequestParameters"> + * <-- Pass parameters (reportType, width and height) --> + * <!-- + * The redirect-action url generated will be : + * /genReport/generateReport.action?reportType=pie&width=100&height=100 + * --> + * <action name="gatherReportInfo" class="..."> + * <result name="showReportResult" type="redirect-action"> + * <param name="actionName">generateReport</param> + * <param name="namespace=">/genReport</param> + * <param name="reportType">pie</param> + * <param name="width">100</param> + * <param name="height">100</param> + * </result> + * </action> + * </package> + * + * * <!-- END SNIPPET: example --></pre> * * @see ActionMapper