You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Siva <si...@india.adventnet.com> on 2003/07/22 11:54:57 UTC

Why not to use Action chaining ?

Friends,

Could anyone of you tell me why we ahuld not use Action chaining in
struts framework ?
I neet to do two different actions for a user action. how can i wachieve
it without action chaining?

Thanks in advance for your help.

Sivakumar


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


Re: Why not to use Action chaining ?

Posted by Alen Ribic <al...@mweb.co.za>.
Hhmm, need to revise my action classes quick! ;)
Fighter I got it some how right or I wasn't chaining my Actions for
prepopulation after all...;) (I know that at least I tried)
Come to think again I think I might have chosen a root of invoking a
combination of business commands form a single action. (no chain!)

But I like the option <2> on Jing's reply. Never thought of that! :)

--Alen


----- Original Message -----
From: "Siva" <si...@india.adventnet.com>
To: "Alen Ribic" <al...@mweb.co.za>
Cc: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, July 22, 2003 4:25 PM
Subject: Re: Why not to use Action chaining ?


> Dear Alen, the following link says strus doed not support action
chaining.....
>
>
http://www.scioworks.net/devnews/strutsDistilled/updates/update-030424/actio
nChain.html
>
> Siva
>
>
> Alen Ribic wrote:
>
> > Well reading the FAQ from what I understand you should be doing the
> > following.
> >
> > You should have access to your necessary business methods from pretty
much
> > any struts action you build.
> > This means that you should be able to carry out all necessary business
> > commands for a particular action hence no chaining would be required to
> > other actions.
> >
> > I however have been using chaining in my current system.
> > I have actions that carry out unique tasks and when chained they
populate my
> > form with all I need!
> >
> > Anyway, I'm too new to Struts hence am not to sure what exactly is the
right
> > way to doing certain things. ;)
> >
> > --Alen
> >
> > ----- Original Message -----
> > From: "Siva" <si...@india.adventnet.com>
> > To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> > Sent: Tuesday, July 22, 2003 12:14 PM
> > Subject: Re: Why not to use Action chaining ?
> >
> > > Thanks Alen,
> > >
> > > Ted Husted (Struts in Action) says that the action chaining in the
dark
> > side
> > > of Struts.
> > >
> > > The problem he mentioned is that
> > >
> > > "when the second action is being invoked, the form is being
'repopulated'
> > > with the initial form values that the form had when it was passed to
the
> > > first action "
> > >
> > > Since I am new to struts, I am not able to grasp it clearly. You can
find
> > the
> > > info related to this in Struts FAQ. I am just wondering what is the
> > alternate
> > > solution.
> > >
> > > Thanks again,
> > > siva
> > >
> > >
> > > Alen Ribic wrote:
> > >
> > > > Maybe I haven't came across this before or I don't understand but
why
> > > > wouldn't you wanna use action chaining?
> > > > I just jump from one action to another until I have all client
requested
> > > > baggage.
> > > > --Alen
> > > >
> > > > ----- Original Message -----
> > > > From: "Siva" <si...@india.adventnet.com>
> > > > To: <st...@jakarta.apache.org>
> > > > Sent: Tuesday, July 22, 2003 11:54 AM
> > > > Subject: Why not to use Action chaining ?
> > > >
> > > > > Friends,
> > > > >
> > > > > Could anyone of you tell me why we ahuld not use Action chaining
in
> > > > > struts framework ?
> > > > > I neet to do two different actions for a user action. how can i
> > wachieve
> > > > > it without action chaining?
> > > > >
> > > > > Thanks in advance for your help.
> > > > >
> > > > > Sivakumar
> > > > >
> > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > 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
> > >
>
>
> ---------------------------------------------------------------------
> 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


Re: Why not to use Action chaining ?

Posted by Siva <si...@india.adventnet.com>.
Dear Alen, the following link says strus doed not support action chaining.....

http://www.scioworks.net/devnews/strutsDistilled/updates/update-030424/actionChain.html

Siva


Alen Ribic wrote:

> Well reading the FAQ from what I understand you should be doing the
> following.
>
> You should have access to your necessary business methods from pretty much
> any struts action you build.
> This means that you should be able to carry out all necessary business
> commands for a particular action hence no chaining would be required to
> other actions.
>
> I however have been using chaining in my current system.
> I have actions that carry out unique tasks and when chained they populate my
> form with all I need!
>
> Anyway, I'm too new to Struts hence am not to sure what exactly is the right
> way to doing certain things. ;)
>
> --Alen
>
> ----- Original Message -----
> From: "Siva" <si...@india.adventnet.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Tuesday, July 22, 2003 12:14 PM
> Subject: Re: Why not to use Action chaining ?
>
> > Thanks Alen,
> >
> > Ted Husted (Struts in Action) says that the action chaining in the dark
> side
> > of Struts.
> >
> > The problem he mentioned is that
> >
> > "when the second action is being invoked, the form is being 'repopulated'
> > with the initial form values that the form had when it was passed to the
> > first action "
> >
> > Since I am new to struts, I am not able to grasp it clearly. You can find
> the
> > info related to this in Struts FAQ. I am just wondering what is the
> alternate
> > solution.
> >
> > Thanks again,
> > siva
> >
> >
> > Alen Ribic wrote:
> >
> > > Maybe I haven't came across this before or I don't understand but why
> > > wouldn't you wanna use action chaining?
> > > I just jump from one action to another until I have all client requested
> > > baggage.
> > > --Alen
> > >
> > > ----- Original Message -----
> > > From: "Siva" <si...@india.adventnet.com>
> > > To: <st...@jakarta.apache.org>
> > > Sent: Tuesday, July 22, 2003 11:54 AM
> > > Subject: Why not to use Action chaining ?
> > >
> > > > Friends,
> > > >
> > > > Could anyone of you tell me why we ahuld not use Action chaining in
> > > > struts framework ?
> > > > I neet to do two different actions for a user action. how can i
> wachieve
> > > > it without action chaining?
> > > >
> > > > Thanks in advance for your help.
> > > >
> > > > Sivakumar
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > 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
> >


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


Re: Why not to use Action chaining ?

Posted by Alen Ribic <al...@mweb.co.za>.
Well reading the FAQ from what I understand you should be doing the
following.

You should have access to your necessary business methods from pretty much
any struts action you build.
This means that you should be able to carry out all necessary business
commands for a particular action hence no chaining would be required to
other actions.

I however have been using chaining in my current system.
I have actions that carry out unique tasks and when chained they populate my
form with all I need!

Anyway, I'm too new to Struts hence am not to sure what exactly is the right
way to doing certain things. ;)

--Alen



----- Original Message -----
From: "Siva" <si...@india.adventnet.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, July 22, 2003 12:14 PM
Subject: Re: Why not to use Action chaining ?


> Thanks Alen,
>
> Ted Husted (Struts in Action) says that the action chaining in the dark
side
> of Struts.
>
> The problem he mentioned is that
>
> "when the second action is being invoked, the form is being 'repopulated'
> with the initial form values that the form had when it was passed to the
> first action "
>
> Since I am new to struts, I am not able to grasp it clearly. You can find
the
> info related to this in Struts FAQ. I am just wondering what is the
alternate
> solution.
>
> Thanks again,
> siva
>
>
> Alen Ribic wrote:
>
> > Maybe I haven't came across this before or I don't understand but why
> > wouldn't you wanna use action chaining?
> > I just jump from one action to another until I have all client requested
> > baggage.
> > --Alen
> >
> > ----- Original Message -----
> > From: "Siva" <si...@india.adventnet.com>
> > To: <st...@jakarta.apache.org>
> > Sent: Tuesday, July 22, 2003 11:54 AM
> > Subject: Why not to use Action chaining ?
> >
> > > Friends,
> > >
> > > Could anyone of you tell me why we ahuld not use Action chaining in
> > > struts framework ?
> > > I neet to do two different actions for a user action. how can i
wachieve
> > > it without action chaining?
> > >
> > > Thanks in advance for your help.
> > >
> > > Sivakumar
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
>


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


Re: Why not to use Action chaining ?

Posted by Jing Zhou <ji...@netspread.com>.
----- Original Message ----- 
From: "Sloan Seaman" <sl...@sgi.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>;
<si...@india.adventnet.com>; "Jing Zhou" <ji...@netspread.com>
Cc: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, July 22, 2003 10:11 AM
Subject: Re: Why not to use Action chaining ?


> Though that is true, it can be avoid if you write your chainer properly.
>
> You can have it "Dechain" and actually invoke a forward to the new action.
>
> Also, you can write an Action that just invokes objects in a linked list
> mannor and have each action called that way.
>
> There are really lots of options for chaining....
>
> As stated in an email a week or so ago, I have a system that does all of
the
> above and more but I'm still trying to get permission from my company to
> release it :(

It is a known issue that many high quality codes can not be released
due to company's policies :-(

As an algorithm engineer and researcher, I have published algorithms
in IEEE transactions and received one U.S patent some years ago (not
related to web) Now I regard the web development process
as a big *algorithm*, so Carrier is created with open source codes for
mission critical components. You could find the Controller Delegation
Model in its source codes now :-) at http://www.netspread.com

The way Craig interprets the MVC pattern is actually a big algorithm
in my opinion. It inspires me to further simplify the whole algorithm. You
could find many other small algorithms I wrote. For example, the
concept of runtime property names for form bean models. The path to
the property of a nested form bean could be adapted if its containing form
bean is changed. It is this enabling technique that I use to create the
general purpose CRUD algorithm.

You are going to find a lot of new ideas in its source codes. What
you couldn't find is the dead-dear-without-eyes :-)

>
> --
> Sloan
>

Jing
Netspread Carrier
http://www.netspread.com

>
> ----- Original Message ----- 
> From: "Siva" <si...@india.adventnet.com>
> To: "Jing Zhou" <ji...@netspread.com>
> Cc: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Tuesday, July 22, 2003 10:28 AM
> Subject: Re: Why not to use Action chaining ?
>
>
> > thanks a lot Jing Zhou,
> > I will try this .
> >
> > Siva
> >
> > Jing Zhou wrote:
> >
> > > ----- Original Message -----
> > > From: "Siva" <si...@india.adventnet.com>
> > > To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> > > Sent: Tuesday, July 22, 2003 5:14 AM
> > > Subject: Re: Why not to use Action chaining ?
> > >
> > > > Thanks Alen,
> > > >
> > > > Ted Husted (Struts in Action) says that the action chaining in the
> dark
> > > side
> > > > of Struts.
> > > >
> > > > The problem he mentioned is that
> > > >
> > > > "when the second action is being invoked, the form is being
> 'repopulated'
> > > > with the initial form values that the form had when it was passed to
> the
> > > > first action "
> > > >
> > > > Since I am new to struts, I am not able to grasp it clearly. You can
> find
> > > the
> > > > info related to this in Struts FAQ. I am just wondering what is the
> > > alternate
> > > > solution.
> > >
> > > There are two alternatives to my knowledge:
> > >
> > > 1) Refactoring Design:
> > >     Put common functions into a separate class and then
> > >     call the common functions from your action classes if you need.
> > >
> > > 2) Controller Delegation Model:
> > >     In one action class, you could find another action instance the
> > >     same way as the RequestProcessor find it and then call the
> > >     execute method on the action instance.
> > >
> > > The second way is very suitable for tools when designers could
> > > organize their actions without any overlap functions. The performance
> > > gain is apparent: no repopulated, no revalidated form beans.
> > >
> > > >
> > > > Thanks again,
> > > > siva
> > > >
> > >
> > > Jing
> > > Netspread Carrier
> > > http://www.netspread.com
> > >
> > > >
> > > > Alen Ribic wrote:
> > > >
> > > > > Maybe I haven't came across this before or I don't understand but
> why
> > > > > wouldn't you wanna use action chaining?
> > > > > I just jump from one action to another until I have all client
> requested
> > > > > baggage.
> > > > > --Alen
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Siva" <si...@india.adventnet.com>
> > > > > To: <st...@jakarta.apache.org>
> > > > > Sent: Tuesday, July 22, 2003 11:54 AM
> > > > > Subject: Why not to use Action chaining ?
> > > > >
> > > > > > Friends,
> > > > > >
> > > > > > Could anyone of you tell me why we ahuld not use Action chaining
> in
> > > > > > struts framework ?
> > > > > > I neet to do two different actions for a user action. how can i
> > > wachieve
> > > > > > it without action chaining?
> > > > > >
> > > > > > Thanks in advance for your help.
> > > > > >
> > > > > > Sivakumar
> > > > > >
> > > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > > 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
> > > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
>
>
> ________________________________________________________________________
> This email has been scanned for all viruses by the MessageLabs Email
> Security System. For more information on a proactive email security
> service working around the clock, around the globe, visit
> http://www.messagelabs.com
> ________________________________________________________________________
>


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


Re: Why not to use Action chaining ?

Posted by Sloan Seaman <sl...@sgi.net>.
Though that is true, it can be avoid if you write your chainer properly.

You can have it "Dechain" and actually invoke a forward to the new action.

Also, you can write an Action that just invokes objects in a linked list
mannor and have each action called that way.

There are really lots of options for chaining....

As stated in an email a week or so ago, I have a system that does all of the
above and more but I'm still trying to get permission from my company to
release it :(

--
Sloan


----- Original Message ----- 
From: "Siva" <si...@india.adventnet.com>
To: "Jing Zhou" <ji...@netspread.com>
Cc: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, July 22, 2003 10:28 AM
Subject: Re: Why not to use Action chaining ?


> thanks a lot Jing Zhou,
> I will try this .
>
> Siva
>
> Jing Zhou wrote:
>
> > ----- Original Message -----
> > From: "Siva" <si...@india.adventnet.com>
> > To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> > Sent: Tuesday, July 22, 2003 5:14 AM
> > Subject: Re: Why not to use Action chaining ?
> >
> > > Thanks Alen,
> > >
> > > Ted Husted (Struts in Action) says that the action chaining in the
dark
> > side
> > > of Struts.
> > >
> > > The problem he mentioned is that
> > >
> > > "when the second action is being invoked, the form is being
'repopulated'
> > > with the initial form values that the form had when it was passed to
the
> > > first action "
> > >
> > > Since I am new to struts, I am not able to grasp it clearly. You can
find
> > the
> > > info related to this in Struts FAQ. I am just wondering what is the
> > alternate
> > > solution.
> >
> > There are two alternatives to my knowledge:
> >
> > 1) Refactoring Design:
> >     Put common functions into a separate class and then
> >     call the common functions from your action classes if you need.
> >
> > 2) Controller Delegation Model:
> >     In one action class, you could find another action instance the
> >     same way as the RequestProcessor find it and then call the
> >     execute method on the action instance.
> >
> > The second way is very suitable for tools when designers could
> > organize their actions without any overlap functions. The performance
> > gain is apparent: no repopulated, no revalidated form beans.
> >
> > >
> > > Thanks again,
> > > siva
> > >
> >
> > Jing
> > Netspread Carrier
> > http://www.netspread.com
> >
> > >
> > > Alen Ribic wrote:
> > >
> > > > Maybe I haven't came across this before or I don't understand but
why
> > > > wouldn't you wanna use action chaining?
> > > > I just jump from one action to another until I have all client
requested
> > > > baggage.
> > > > --Alen
> > > >
> > > > ----- Original Message -----
> > > > From: "Siva" <si...@india.adventnet.com>
> > > > To: <st...@jakarta.apache.org>
> > > > Sent: Tuesday, July 22, 2003 11:54 AM
> > > > Subject: Why not to use Action chaining ?
> > > >
> > > > > Friends,
> > > > >
> > > > > Could anyone of you tell me why we ahuld not use Action chaining
in
> > > > > struts framework ?
> > > > > I neet to do two different actions for a user action. how can i
> > wachieve
> > > > > it without action chaining?
> > > > >
> > > > > Thanks in advance for your help.
> > > > >
> > > > > Sivakumar
> > > > >
> > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > 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
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________

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


Re: Why not to use Action chaining ?

Posted by Siva <si...@india.adventnet.com>.
thanks a lot Jing Zhou,
I will try this .

Siva

Jing Zhou wrote:

> ----- Original Message -----
> From: "Siva" <si...@india.adventnet.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Tuesday, July 22, 2003 5:14 AM
> Subject: Re: Why not to use Action chaining ?
>
> > Thanks Alen,
> >
> > Ted Husted (Struts in Action) says that the action chaining in the dark
> side
> > of Struts.
> >
> > The problem he mentioned is that
> >
> > "when the second action is being invoked, the form is being 'repopulated'
> > with the initial form values that the form had when it was passed to the
> > first action "
> >
> > Since I am new to struts, I am not able to grasp it clearly. You can find
> the
> > info related to this in Struts FAQ. I am just wondering what is the
> alternate
> > solution.
>
> There are two alternatives to my knowledge:
>
> 1) Refactoring Design:
>     Put common functions into a separate class and then
>     call the common functions from your action classes if you need.
>
> 2) Controller Delegation Model:
>     In one action class, you could find another action instance the
>     same way as the RequestProcessor find it and then call the
>     execute method on the action instance.
>
> The second way is very suitable for tools when designers could
> organize their actions without any overlap functions. The performance
> gain is apparent: no repopulated, no revalidated form beans.
>
> >
> > Thanks again,
> > siva
> >
>
> Jing
> Netspread Carrier
> http://www.netspread.com
>
> >
> > Alen Ribic wrote:
> >
> > > Maybe I haven't came across this before or I don't understand but why
> > > wouldn't you wanna use action chaining?
> > > I just jump from one action to another until I have all client requested
> > > baggage.
> > > --Alen
> > >
> > > ----- Original Message -----
> > > From: "Siva" <si...@india.adventnet.com>
> > > To: <st...@jakarta.apache.org>
> > > Sent: Tuesday, July 22, 2003 11:54 AM
> > > Subject: Why not to use Action chaining ?
> > >
> > > > Friends,
> > > >
> > > > Could anyone of you tell me why we ahuld not use Action chaining in
> > > > struts framework ?
> > > > I neet to do two different actions for a user action. how can i
> wachieve
> > > > it without action chaining?
> > > >
> > > > Thanks in advance for your help.
> > > >
> > > > Sivakumar
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > 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
> >


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


Re: Why not to use Action chaining ?

Posted by Jing Zhou <ji...@netspread.com>.
----- Original Message ----- 
From: "Siva" <si...@india.adventnet.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, July 22, 2003 5:14 AM
Subject: Re: Why not to use Action chaining ?


> Thanks Alen,
>
> Ted Husted (Struts in Action) says that the action chaining in the dark
side
> of Struts.
>
> The problem he mentioned is that
>
> "when the second action is being invoked, the form is being 'repopulated'
> with the initial form values that the form had when it was passed to the
> first action "
>
> Since I am new to struts, I am not able to grasp it clearly. You can find
the
> info related to this in Struts FAQ. I am just wondering what is the
alternate
> solution.

There are two alternatives to my knowledge:

1) Refactoring Design:
    Put common functions into a separate class and then
    call the common functions from your action classes if you need.

2) Controller Delegation Model:
    In one action class, you could find another action instance the
    same way as the RequestProcessor find it and then call the
    execute method on the action instance.

The second way is very suitable for tools when designers could
organize their actions without any overlap functions. The performance
gain is apparent: no repopulated, no revalidated form beans.

>
> Thanks again,
> siva
>

Jing
Netspread Carrier
http://www.netspread.com


>
> Alen Ribic wrote:
>
> > Maybe I haven't came across this before or I don't understand but why
> > wouldn't you wanna use action chaining?
> > I just jump from one action to another until I have all client requested
> > baggage.
> > --Alen
> >
> > ----- Original Message -----
> > From: "Siva" <si...@india.adventnet.com>
> > To: <st...@jakarta.apache.org>
> > Sent: Tuesday, July 22, 2003 11:54 AM
> > Subject: Why not to use Action chaining ?
> >
> > > Friends,
> > >
> > > Could anyone of you tell me why we ahuld not use Action chaining in
> > > struts framework ?
> > > I neet to do two different actions for a user action. how can i
wachieve
> > > it without action chaining?
> > >
> > > Thanks in advance for your help.
> > >
> > > Sivakumar
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
>


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


Re: Why not to use Action chaining ?

Posted by Sandeep Takhar <sa...@yahoo.com>.
In a lot of locations there is mention that actions
should not have business logic in them.

By chaining you are sometimes calling an action to
invoke the business methods that it contains.  This is
frowned upon as not a best practice.

Action chaining is useful sometimes and there is no
question about that.  It is useful to call some
presentation logic by chaining to an action that will
return to the originally called action.

It is difficult to grasp, but if the business delegate
does not contain any httpservletRequest etc stuff in
it, then this is a better approach.  There are more
layers.

sandeep
--- Siva <si...@india.adventnet.com> wrote:
> Thanks Alen,
> 
> Ted Husted (Struts in Action) says that the action
> chaining in the dark side
> of Struts.
> 
> The problem he mentioned is that
> 
> "when the second action is being invoked, the form
> is being 'repopulated'
> with the initial form values that the form had when
> it was passed to the
> first action "
> 
> Since I am new to struts, I am not able to grasp it
> clearly. You can find the
> info related to this in Struts FAQ. I am just
> wondering what is the alternate
> solution.
> 
> Thanks again,
> siva
> 
> 
> Alen Ribic wrote:
> 
> > Maybe I haven't came across this before or I don't
> understand but why
> > wouldn't you wanna use action chaining?
> > I just jump from one action to another until I
> have all client requested
> > baggage.
> > --Alen
> >
> > ----- Original Message -----
> > From: "Siva" <si...@india.adventnet.com>
> > To: <st...@jakarta.apache.org>
> > Sent: Tuesday, July 22, 2003 11:54 AM
> > Subject: Why not to use Action chaining ?
> >
> > > Friends,
> > >
> > > Could anyone of you tell me why we ahuld not use
> Action chaining in
> > > struts framework ?
> > > I neet to do two different actions for a user
> action. how can i wachieve
> > > it without action chaining?
> > >
> > > Thanks in advance for your help.
> > >
> > > Sivakumar
> > >
> > >
> > >
>
---------------------------------------------------------------------
> > > 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!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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


Re: Why not to use Action chaining ?

Posted by Siva <si...@india.adventnet.com>.
Thanks Alen,

Ted Husted (Struts in Action) says that the action chaining in the dark side
of Struts.

The problem he mentioned is that

"when the second action is being invoked, the form is being 'repopulated'
with the initial form values that the form had when it was passed to the
first action "

Since I am new to struts, I am not able to grasp it clearly. You can find the
info related to this in Struts FAQ. I am just wondering what is the alternate
solution.

Thanks again,
siva


Alen Ribic wrote:

> Maybe I haven't came across this before or I don't understand but why
> wouldn't you wanna use action chaining?
> I just jump from one action to another until I have all client requested
> baggage.
> --Alen
>
> ----- Original Message -----
> From: "Siva" <si...@india.adventnet.com>
> To: <st...@jakarta.apache.org>
> Sent: Tuesday, July 22, 2003 11:54 AM
> Subject: Why not to use Action chaining ?
>
> > Friends,
> >
> > Could anyone of you tell me why we ahuld not use Action chaining in
> > struts framework ?
> > I neet to do two different actions for a user action. how can i wachieve
> > it without action chaining?
> >
> > Thanks in advance for your help.
> >
> > Sivakumar
> >
> >
> > ---------------------------------------------------------------------
> > 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

Re: Why not to use Action chaining ?

Posted by Alen Ribic <al...@mweb.co.za>.
Maybe I haven't came across this before or I don't understand but why
wouldn't you wanna use action chaining?
I just jump from one action to another until I have all client requested
baggage.
--Alen

----- Original Message -----
From: "Siva" <si...@india.adventnet.com>
To: <st...@jakarta.apache.org>
Sent: Tuesday, July 22, 2003 11:54 AM
Subject: Why not to use Action chaining ?


> Friends,
>
> Could anyone of you tell me why we ahuld not use Action chaining in
> struts framework ?
> I neet to do two different actions for a user action. how can i wachieve
> it without action chaining?
>
> Thanks in advance for your help.
>
> Sivakumar
>
>
> ---------------------------------------------------------------------
> 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


Re: Why not to use Action chaining ?

Posted by "Jens v.P." <de...@jevopi.de>.
Hello,


Am Dienstag, 22.07.03 um 16:37 Uhr schrieb Siva:
> My requirement is like this : I have two different JSP files (assume 
> a.jsp
> ane b.jsp) arranged as tiles in a Layout page. If the user makes an 
> action
> in a.jsp, I need to change the model corresponds to both the a.jsp and
> b.jsp - both are independent and a.jsp will be in a small framework and
> this b.jsp can vary according to the modules the user views.
> b

If "b" is to be changed by "a", isn't there an interface or function of 
a business controller like class in framework "b" that can be called by 
"a". What does the second action calls? Do you need the second action 
as an adapter to different "b"-frameworks? Why don't you separate this 
adapter from the actions?

Jens

BTW: I wrote that command or actions in the command-pattern are 
stateless. This is not true. E.g. for undoing purposes they can have a 
state. But I'm still not sure if this state indicates the state of the 
business model or the state of the action itself ....


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


Re: Why not to use Action chaining ?

Posted by Siva <si...@india.adventnet.com>.
thanks jens,

My requirement is like this : I have two different JSP files (assume a.jsp
ane b.jsp) arranged as tiles in a Layout page. If the user makes an action
in a.jsp, I need to change the model corresponds to both the a.jsp and
b.jsp - both are independent and a.jsp will be in a small framework and
this b.jsp can vary according to the modules the user views.

This is the reason I am looking for chaining actions.

thanks again for your help..
Siva



"Jens v.P." wrote:

> Hello,
>
> > Could anyone of you tell me why we ahuld not use Action chaining in
> > struts framework ?
> >
>
> I'm a Struts newbie, so maybe my answer ends up in a new question. But
> as far as I understand the action pattern (question 1: Are Struts
> actions commands as described in the GOF book). And as far as I
> understand this pattern, an action (or command) capsulates an action in
> an object. An action or command has no state (question 2: as far as I
> understand this pattern... maybe I'm wrong).
>
> So - why do you want to chain actions? Maybe because one action
> "extends" another action, like one use case can extend another use
> case. In this case, somewhere a state must exists, because otherwise
> one action "includes" the other action. But a state must have no
> influence to an action.
> If you have two actions with no other dependency but that the user can
> trigger them - so why do you need to chain them?
>
> > I neet to do two different actions for a user action. how can i
> > wachieve
> > it without action chaining?
> >
>
> Maybe you can explain, why you need two different actions and why you
> think you have to chain them.
>
> Jens
>
> ---------------------------------------------------------------------
> 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


Re: Why not to use Action chaining ?

Posted by "Jens v.P." <de...@jevopi.de>.
Hello,

> Could anyone of you tell me why we ahuld not use Action chaining in
> struts framework ?
>

I'm a Struts newbie, so maybe my answer ends up in a new question. But 
as far as I understand the action pattern (question 1: Are Struts 
actions commands as described in the GOF book). And as far as I 
understand this pattern, an action (or command) capsulates an action in 
an object. An action or command has no state (question 2: as far as I 
understand this pattern... maybe I'm wrong).

So - why do you want to chain actions? Maybe because one action 
"extends" another action, like one use case can extend another use 
case. In this case, somewhere a state must exists, because otherwise 
one action "includes" the other action. But a state must have no 
influence to an action.
If you have two actions with no other dependency but that the user can 
trigger them - so why do you need to chain them?

> I neet to do two different actions for a user action. how can i 
> wachieve
> it without action chaining?
>

Maybe you can explain, why you need two different actions and why you 
think you have to chain them.

Jens


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