[ 
https://issues.apache.org/struts/browse/WW-2598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Don Brown updated WW-2598:
--------------------------

    Fix Version/s: 2.1.3

> automatically set ActionMapper for ServletRedirectResult
> --------------------------------------------------------
>
>                 Key: WW-2598
>                 URL: https://issues.apache.org/struts/browse/WW-2598
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Actions
>            Reporter: Brad Cupit
>            Priority: Minor
>             Fix For: 2.1.3
>
>
> when a ServletRedirectResult (or a subclass of it, like 
> ServletRedirectActionResult) is instantiated and returned as the Result for 
> the Action, the ActionMapper must be manually set by the developer. So, 
> instead of this
> // ideal situation
> public Result submit() {
>       return new 
> ServletActionRedirectResult("actionName").addParameter("param1", "${value1}");
> }
> the user must code this:
> // manually set the ActionMapper
> public Result submit() throws Exception {
>       ServletActionRedirectResult result = new 
> ServletActionRedirectResult("actionName").addParameter("param1", "${value1}");
>       result.setActionMapper(actionMapper);
>       return result;
> }
> and to get the ActionMapper in the Action, you have to add this setter:
> @Inject
> public void setActionMapper(ActionMapper actionMapper) { ... }
> This is a feature request/improvement so that the ActionMapper can be 
> automatically set in (or looked up by) the ServletRedirectResult.
> see this mailing list post:
> http://article.gmane.org/gmane.comp.jakarta.struts.user/155271
> and this reply by Don Brown:
> http://article.gmane.org/gmane.comp.jakarta.struts.user/155272

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to