You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Lance Semmens <la...@swebtec.com> on 2005/07/26 18:24:20 UTC
Actions forwarding to actions
I'm a newbie to struts and I'm maintaining what I consider to be
spaghetti code.
There actions which forward to other actions and I'm getting lost a bit
lost at times.
As a rule, should an action be all encompassing and therefore not need
to forward to another action?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Actions forwarding to actions
Posted by Jeff Beal <jb...@gmail.com>.
See http://wiki.apache.org/struts/ActionChaining?highlight=%28actionchaining%29
On 7/26/05, Lance Semmens <la...@swebtec.com> wrote:
> I'm a newbie to struts and I'm maintaining what I consider to be
> spaghetti code.
> There actions which forward to other actions and I'm getting lost a bit
> lost at times.
> As a rule, should an action be all encompassing and therefore not need
> to forward to another action?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Actions forwarding to actions
Posted by Liming Xu <an...@126.com>.
You can also add RequestProcessor as controllers.
----- Original Message -----
From: BHansard@powersystems.rockwell.com
To: Struts Users Mailing List
Cc: Struts Users Mailing List
Sent: Tuesday, July 26, 2005 1:40 PM
Subject: Re: Actions forwarding to actions
Not always.
An Action should be created to perform a specific control instance. For Example, if you are going to insert a record, the Action class has all the required code to insert the record. However, as you get into more complex systems, you will often find that you are duplicating a lot of the same functions. At this point you have to abstract many of these functions into utility or helper classes to reduce the amount of duplication that you have. This reduces your action class down to simply flow control logic. But if this becomes highly repetitive, then you may breakout into calling multiple actions that know how to handle a specific set of events.
"Lance Semmens" <la...@swebtec.com>
"Lance Semmens" <la...@swebtec.com>
07/26/2005 12:24 PM Please respond to
"Struts Users Mailing List" <us...@struts.apache.org>
To
"Struts Users Mailing List" <us...@struts.apache.org>
cc
Subject
Actions forwarding to actions
I'm a newbie to struts and I'm maintaining what I consider to be
spaghetti code.
There actions which forward to other actions and I'm getting lost a bit
lost at times.
As a rule, should an action be all encompassing and therefore not need
to forward to another action?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Actions forwarding to actions
Posted by BH...@powersystems.rockwell.com.
Not always.
An Action should be created to perform a specific control instance. For
Example, if you are going to insert a record, the Action class has all the
required code to insert the record. However, as you get into more complex
systems, you will often find that you are duplicating a lot of the same
functions. At this point you have to abstract many of these functions into
utility or helper classes to reduce the amount of duplication that you
have. This reduces your action class down to simply flow control logic.
But if this becomes highly repetitive, then you may breakout into calling
multiple actions that know how to handle a specific set of events.
"Lance Semmens"
<lance.semmens@sw
ebtec.com> To
"Struts Users Mailing List"
07/26/2005 12:24 <us...@struts.apache.org>
PM cc
Subject
Please respond to Actions forwarding to actions
"Struts Users
Mailing List"
<user@struts.apac
he.org>
I'm a newbie to struts and I'm maintaining what I consider to be
spaghetti code.
There actions which forward to other actions and I'm getting lost a bit
lost at times.
As a rule, should an action be all encompassing and therefore not need
to forward to another action?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org