struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <shirishchandra.sakh...@ubs.com>
Subject RE: Action Chaining - how to avoid?
Date Thu, 22 May 2003 14:08:13 GMT


-----Original Message-----
From: Michael Ruppin [mailto:mruppin@yahoo.com]
Sent: Thursday, May 22, 2003 4:05 PM
To: Struts Users Mailing List
Subject: RE: Action Chaining - how to avoid?


Thanks.  I have read many such threads. :) 
Ultimately, after determining that my chaning approach
might be acceptable from a design perspective, I was
still unable to resolve the problem here:

http://us.f200.mail.yahoo.com/ym/ShowLetter?MsgId=7651_1338585_14057_1927_1108_0_26324_3150_1141776405&YY=54328&inc=25&order=down&sort=date&pos=2&view=a&head=b&box=Struts

m


--- shirishchandra.sakhare@ubs.com wrote:
> Hi,
> Action chainning is not if done properly...I had
> posted a question about this and there was a long
> discussion on this.
> Follow the folowing thread and it shoudl help you-
>
http://marc.theaimsgroup.com/?l=struts-user&m=104394029806441&w=2
> 
> But from my experience(Only 1 struts project i must
> admit...But a very large one...And complex as
> well),I will say that ActionChainning per say is not
> bad.
> 
> But One action should be a handler for one
> function...The handling of one singl e function
> should nto be broken across actions..This type of
> action chainning is certainly bad and indicates
> design problem...
> 
> But if one action does one Conplete Unit of
> WOrk(GetAllAccountForAUser for exapmple...)And
> another action can reuse this(LogInAction after
> succesfule login should show All accounts for a
> user...),there is no prpblem in action
> chainning.Because as in this example, the same
> getAccountListAction can be called by so many other
> actions to show accoutnList afer they are done with
> thier work.(Save Account,update account etc
> etc..).And each action is doing an independent unit
> of work...We have found this approac extremely
> useful...
> 
> -----Original Message-----
> From: Michael Ruppin [mailto:mruppin@yahoo.com]
> Sent: Thursday, May 22, 2003 3:21 PM
> To: Struts Users Mailing List
> Subject: Action Chaining - how to avoid?
> 
> 
> So I've been told, any forward returned from an
> execute method matching the path of another action
> would be considered action chaining.  So, how am I
> supposed to avoid chaining, and provide navigation? 
> If I change [all] my forwards to go to jsps, I lose
> the ability to pass through [the validate and] the
> execute method[s] where I set up the form for the
> Struts tags, and perform other checks better left
> out
> of the jsp, like verifing that the user is logged
> in. 
> If I use links in my jsps, I lose the ability to
> manage navigation changes through the struts-config.
> 
> I've read that the need for action chaining is
> related
> to a problem with my business logic which needs
> re-factoring.  If my need, for example, is to go
> from
> an "Edit X" screen, to a "Confirm X deletion"
> screen,
> how is this related to business logic, and how would
> I
> refactor?  To avoid problems like
> java.lang.IllegalArgumentException in beanutils when
> chaining I tried changing my mappings and setting
> redirect=true, which works, but there are situations
> in which I need the request data in the next action.
> 
> Putting the data in the session is not the answer,
> since in this case, the data I need in the request
> is
> to differentiate between two IE browsers that were
> launched against the same session.  Ideas?  Was
> there
> perhaps some other way of avoiding the
> java.lang.IllegalArgumentException problem I posted
> (
>
http://us.f200.mail.yahoo.com/ym/ShowLetter?MsgId=7651_1338585_14057_1927_1108_0_26324_3150_1141776405&YY=54328&inc=25&order=down&sort=date&pos=2&view=a&head=b&box=Struts
> ), allowing me to go back to chaining without wiping
> out the request?  
> 
> m
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

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


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


Mime
View raw message