Yes, you can chain actions if they are in the same package:

http://cwiki.apache.org/WW/convention-plugin.html#ConventionPlugin-Chaining

musachy

On Tue, Mar 10, 2009 at 11:52 AM, Edward Song
<edward.s...@nuhorizons.com> wrote:
> Hi all,
>
> This question concerns the Convention Plugin, specifically in regards to
> Action Chaining.
>
> I am using Struts 2.1.6
>
> I have the following package structure.
>
>  com.company.web.actions.administrators.GetAction
> (/administrators/get)
>  com.company.web.actions.administrators.SaveAction
> (/administrators/save)
>
> After SaveAction.execute(), I wanted to use action chaining and forward
> to GetAction.execute().
>
> I was able to get this to work via annotations in my SaveAction class.  The
> execute() method returns ActionSupport.SUCCESS.
>
> @Results({
>
> @Result(name=ActionSupport.*SUCCESS*, type="chain", location="get")
>
> })
> However, it seems through the examples, that annotations may not be required
> for simple action chaining.
> Can we return an action name, effectively chainining the actions together?
> I had attempted returning "get" in my SaveAction.execute(), thinking that it
> would action chain GetAction.
> The result was forwarded to my /WEB-INF/content/administrators/get.jsp, but
> never actually ran GetAction.execute() .
>
> Any idea as to what my SaveAction.execute() method should return to
> accomplish simple action chaining without the annotation above?
>
> Thank you in advance.
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to