I'm prevented from adding my redirect parameter programmatically with 2.1.6!
Look:
Map<String, ResultConfig> resultsMap =
ServletActionContext.getActionContext(getRequest())
.getActionInvocation().getProxy().getConfig().getResults();
ResultConfig config = resultsMap.get(resultName);
Map<String, String> params = config.getParams();
params.put(paramName, paramValue.toString());
causes:
java.lang.UnsupportedOperationException
at java.util.Collections$UnmodifiableMap.put(Collections.java:1285)
Or am I jumping to conclusions again?
Adam
--- original message author="Musachy Barroso"
>I think just need to pass a string, instead of an object in the value
param.
>
>musachy
>
>On Mon, Jan 26, 2009 at 10:37 AM, Adam Hardy wrote:
> Hi,
>
> got a compilation error after upgrading from 2.0.11 to 2.1.6 due to
> changes
> in com.opensymphony.xwork2.config.entities.ResultConfig
>
> I am doing this:
>
> public boolean addRedirectParameter(String resultName, String
> paramName,
> Object paramValue)
> {
> Map<String, ResultConfig> resultsMap =
> ServletActionContext.getActionContext(getRequest())
> .getActionInvocation().getProxy().getConfig().getResults();
> ResultConfig config = resultsMap.get(resultName);
> if (config == null)
> {
> return false;
> }
> else
> {
> config.addParam(paramName, paramValue); // 2.1.6 COMPILE ERROR
> return true;
> }
> }
>
>
> which I can call in my actions in order to put another parameter onto the
> redirect URL of my result.
>
> In 2.1.6, ResultConfig has no addParam() method anymore.
>
> After checking the upgrade troubleshooting guide and the user lists, it
> seems nobody else is suffering from this problem. Could somebody give me
> an
> idea how to deal with this?
>
>
> Thanks,
>
> Adam
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
--
View this message in context:
http://www.nabble.com/2.1.6-upgrade-from-2.0.11---ResultConfig-tp21667543p21832488.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]