You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ian Roughley <ia...@fdar.com> on 2007/02/22 21:50:21 UTC
[s2] @Result annotation - params field
Does anyone have a use case for the params field in the Result
annotation? Currently it's defined in the annotation as:
String[] params() default {};
which I'm not sure makes sense as a name and value was passed in the XML
configuration.
/Ian
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: @Result annotation - params field
Posted by Paweł Wielgus <po...@gmail.com>.
Hi,
@Result (type=ServletActionRedirectResult.class, value = "show",
params = {"namespace", "/wsp/boss/target", "month", "${month}",
"year", "${year}"})
You need to add getMonth() and getYear() in action that is calling this result.
Best greetings,
Paweł Wielgus.
2008/10/28 col_chappy <gr...@gillware.com>:
>
> Bump... with a little more info.
>
> Using struts 2.0.11.2. I have the annotation
> @Result(name="success", value="someaction", params={"id", "${id}"},
> type=ServletActionRedirectResult.class). There is a getter and setter for
> "id" on both action classes. Neither is called. Results are the same setting
> the second item in the array to a literal value. Has anyone had success with
> the action Result annotation and the "params" parameter?
>
>
> Ian Roughley wrote:
>>
>> Does anyone have a use case for the params field in the Result
>> annotation? Currently it's defined in the annotation as:
>>
>> String[] params() default {};
>>
>> which I'm not sure makes sense as a name and value was passed in the XML
>> configuration.
>>
>> /Ian
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/%40Result-annotation---params-field-tp9108077p20215952.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: @Result annotation - params field
Posted by col_chappy <gr...@gillware.com>.
Bump... with a little more info.
Using struts 2.0.11.2. I have the annotation
@Result(name="success", value="someaction", params={"id", "${id}"},
type=ServletActionRedirectResult.class). There is a getter and setter for
"id" on both action classes. Neither is called. Results are the same setting
the second item in the array to a literal value. Has anyone had success with
the action Result annotation and the "params" parameter?
Ian Roughley wrote:
>
> Does anyone have a use case for the params field in the Result
> annotation? Currently it's defined in the annotation as:
>
> String[] params() default {};
>
> which I'm not sure makes sense as a name and value was passed in the XML
> configuration.
>
> /Ian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/%40Result-annotation---params-field-tp9108077p20215952.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org