You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Musachy Barroso (JIRA)" <ji...@apache.org> on 2009/03/20 15:56:03 UTC

[jira] Resolved: (WW-3052) let @params support valuestack

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

Musachy Barroso resolved WW-3052.
---------------------------------

    Resolution: Duplicate

The problem is not the Convention plugin, the problem is that redirectAction has never supported nested parameters, and you had to pass the parameters in the "location" parameter. this was recently fixed in trunk, see https://issues.apache.org/struts/browse/WW-3046

> let @params support valuestack
> ------------------------------
>
>                 Key: WW-3052
>                 URL: https://issues.apache.org/struts/browse/WW-3052
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - Convention
>    Affects Versions: 2.1.6
>            Reporter: zha zhengyin
>
> Sorry for my poor english! :)
> In XML result definition, We can use ${paramName} to get a value in ValueStack , it is useful. but in Convention plugin, using @params annotation can only using some literal string for parameter's value. let @params retrieve value from the valuestack if  the format of value part in @params like ${paramName}, like this:
> public class MyAction extends BaseAction {
> private String produtId;
> public void setProductId(String id){...}
> @Action(results = { @Result(name = "success", location = "list-item.action", type = "redirectAction",params={"produtId","${produtId}"})})
> public String execute()
> {
> return SUCCESS;
> }
> }

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