struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Don Brown (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (WW-2598) automatically set ActionMapper for ServletRedirectResult
Date Sat, 14 Jun 2008 05:05:05 GMT

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

Don Brown resolved WW-2598.
---------------------------

    Resolution: Fixed
      Assignee: Don Brown

Fixed as described - results are now autowired

> 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
>            Assignee: Don Brown
>            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.


Mime
View raw message