You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by wild_oscar <mi...@almeida.at> on 2007/12/17 13:56:52 UTC
[S2] Result annotation - possibility to pass method as parameter?
When using Result annotations to configure Actions, is it possible to pass
the method as a parameter in the actionchainresult?
Say you have one action and want to chain it to another action. You use:
@Result(name="send",type=ActionChainResult.class,value="actionName")
Unfortunately, this will send you to the execute() method of actionName. How
can you go to another method? Something like:
@Result(name="send",type=ActionChainResult.class,value="actionName",params=
{"method,anotherMethod"}).
--
View this message in context: http://www.nabble.com/-S2--Result-annotation---possibility-to-pass-method-as-parameter--tp14370279p14370279.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: [S2] Result annotation - possibility to pass method as
parameter?
Posted by wild_oscar <mi...@almeida.at>.
For those interested, the answer to this question is:
@Result(name="name",type=ActionChainResult.class,value="actionName" ,params=
{"method","methodName"})
wild_oscar wrote:
>
> When using Result annotations to configure Actions, is it possible to pass
> the method as a parameter in the actionchainresult?
>
> Say you have one action and want to chain it to another action. You use:
>
> @Result(name="send",type=ActionChainResult.class,value="actionName")
>
> Unfortunately, this will send you to the execute() method of actionName.
> How can you go to another method? Something like:
> @Result(name="send",type=ActionChainResult.class,value="actionName",params=
> {"method,anotherMethod"}).
>
>
--
View this message in context: http://www.nabble.com/-S2--Result-annotation---possibility-to-pass-method-as-parameter--tp14370279p16824964.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