You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Saqib Chaudhary <ch...@gmail.com> on 2009/04/01 22:40:00 UTC
WW-1960 converting all parameters to string array
Recently I upgraded to struts 2.1 GA from 2.0. Noticed that param tag used
in action tag is no longer passing non array non string objects to the
action being called, actually throwing an exception
Change is under https://issues.apache.org/struts/browse/WW-1960
ActionComponent class has the following logic now
if (val.getClass().isArray() && String.class ==
val.getClass().getComponentType()) {
params.put(key, (String[]) val);
} else {
params.put(key, new String[] { val.toString() });
}
The objects created in my application cannot be passed to an action anymore.
<s:action name="myAction" executeResult="true">
<s:param name="param1" value="myObjectMap['myObjectName']"/>
<s:action>
Is there anyway around this ? I really liked the nice feature to pass
objects around. Appreciate any suggestions
RE: WW-1960 converting all parameters to string array
Posted by Martin Gainty <mg...@hotmail.com>.
you may have found a bug on a untested cornercase..
pls see followup comments in JIRA
thanks
>
> Recently I upgraded to struts 2.1 GA from 2.0. Noticed that param tag used
> in action tag is no longer passing non array non string objects to the
> action being called, actually throwing an exception
>
> Change is under https://issues.apache.org/struts/browse/WW-1960
>
> ActionComponent class has the following logic now
>
> The objects created in my application cannot be passed to an action anymore.
>
> <s:action name="myAction" executeResult="true">
> <s:param name="param1" value="myObjectMap['myObjectName']"/>
> <s:action>
>
>
> Is there anyway around this ? I really liked the nice feature to pass
> objects around. Appreciate any suggestions
_________________________________________________________________
Quick access to your favorite MSN content and Windows Live with Internet Explorer 8.
http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A
Re: WW-1960 converting all parameters to string array
Posted by Musachy Barroso <mu...@gmail.com>.
You might want to search the @dev mailing list archives, I remember
this was mentioned.
musachy
On Wed, Apr 1, 2009 at 4:40 PM, Saqib Chaudhary <ch...@gmail.com> wrote:
> Recently I upgraded to struts 2.1 GA from 2.0. Noticed that param tag used
> in action tag is no longer passing non array non string objects to the
> action being called, actually throwing an exception
>
> Change is under https://issues.apache.org/struts/browse/WW-1960
>
> ActionComponent class has the following logic now
>
> if (val.getClass().isArray() && String.class ==
> val.getClass().getComponentType()) {
> params.put(key, (String[]) val);
> } else {
> params.put(key, new String[] { val.toString() });
> }
>
> The objects created in my application cannot be passed to an action anymore.
>
> <s:action name="myAction" executeResult="true">
> <s:param name="param1" value="myObjectMap['myObjectName']"/>
> <s:action>
>
>
> Is there anyway around this ? I really liked the nice feature to pass
> objects around. Appreciate any suggestions
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org