struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jasper Rosenberg (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4170) Allow String arrays/iterables to be passed as params to redirectAction result
Date Wed, 09 Jul 2014 01:41:04 GMT

    [ https://issues.apache.org/jira/browse/WW-4170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14055740#comment-14055740
] 

Jasper Rosenberg commented on WW-4170:
--------------------------------------

Looks like it should work, thanks!

> Allow String arrays/iterables to be passed as params to redirectAction result
> -----------------------------------------------------------------------------
>
>                 Key: WW-4170
>                 URL: https://issues.apache.org/jira/browse/WW-4170
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Other
>    Affects Versions: 2.3.15.1
>            Reporter: Jasper Rosenberg
>              Labels: result
>             Fix For: 2.3.18
>
>
> It would be really nice to be able to have a result like:
> {code:xml}
> <result type="redirectAction">
>   <param name="actionName">doit</param>
>   <param name=actionMessages>${actionMessages}</param>
> </result>
> {code}
> Where actionMessages is the result of getActionMessages() from a ValidationAware action,
and has more than one message.
> And have that generate a url like: http://myco.com/doit.action?actionMessages=Message+1&actionMessages=Message+2
> Rather than convert the result into the toString of the collection which then can't be
interpreted by struts on the other end as a collection.  
> Looking at ServletRedirectResult.doExecute(), it does use urlHelper.buildParametersString()
which is array/iterable aware, so the trick would be to allow the parsing of the parameter
value to be a String[] or Iterable<String> (and have the ParsedValueEvaluator run against
the contents).
> We'd probably only want to support this functionality for the ServletActionRedirectResult
even though it would have to be implemented at the ServletRedirectResult layer.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message