[ http://issues.apache.org/struts/browse/WW-419?page=all ]

Don Brown closed WW-419.
------------------------

    Fix Version/s:     (was: Future)
       Resolution: Implemented

This capability has been implemented in WebWork 2, and since this JIRA is only 
concerned with post WebWork 2, I'm closing the ticket.

> Views as parameterized redirects
> --------------------------------
>
>                 Key: WW-419
>                 URL: http://issues.apache.org/struts/browse/WW-419
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Configuration, Dispatch
>    Affects Versions: WW 1.4.1
>            Reporter: William Jones
>         Attachments: patch.diff
>
>
> I am sure I speak for most webwork 1.x users when I talk of the pain of 
> redirects.  The necessity of having the action construct the redirect (albeit 
> through the use of the RedirectAction) seems to be grossly out of step with 
> the way that forwards (ie views) are done.  Redirects are a common 
> requirement wherever you have an action which changes state - you want to 
> redirect to another page to avoid nastiness if the user clicks refresh (like 
> debitting your credit card again for example).
> What I am embarking on is a change that would allow this to be handled 
> seamlessly by simply returning a result from the action.
> The actions.xml would now support entries of the form:
>     <action name="portfolio.AddHolding" alias="AddHolding">
>         <view name="input">/portfolio/addholding.jsp</view>
>         <view name="success">
>             <url redirect="true">ViewPortfolio.action</url>
>           <param name="portfolioId" value="portfolioId" />
>             <param name="currency" value="'USD'" />
>         </view>
>     </action>
> The param tags define what parameters are passed with the redirect, the 
> values being expressions that will be evaluated across the ValueStack when 
> the dispatcher processes the results.
> I've started work on this, but I'd be interested in any comments from anyone.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to