You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Frances Aleah Z. de Guzman" <ad...@ingenium.com.ph> on 2003/07/06 16:41:23 UTC

Re: Action forward to another action without form

you can define it to your forward in your struts-config, instead of forwarding 
it to a page, forward it to an action. but this is not a good practice 
though.

On Monday 07 July 2003 10:31 am, Benjamin Stewart wrote:
> Can you point me in the right direction, none of my books talk about it,
> cant find examples etc.
>
> Ben
>
> Dan Tran wrote:
> >Yes;)
> >
> >
> >----- Original Message -----
>
> From: "Benjamin Stewart" <bs...@waterwerks.com.au>
>
> >Newsgroups: Struts
> >Sent: Sunday, July 06, 2003 6:59 PM
> >Subject: Action forward to another action without form
> >
> >>Greetings,
> >> I have a form that submits values. From the Action class I would (in
> >>some circumstances) like to go directly to another action class and then
> >>forward to a view. Is this possible ?
> >>
> >>Thanks
> >>Ben
> >
> >---------------------------------------------------------------------
> >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

-- 
Frances Aleah Z. De Guzman
SA/Programmer
Ingenium Technology, Inc.
http://www.ingenium.com.ph

Disclaimer :
This message is intended only for the named recipient. If you are not the
intended recipient you are notified that disclosing, copying, distributing
or taking any action in reliance on the contents of this information is
strictly prohibited.



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


Re: Action forward to another action without form

Posted by Jing Zhou <ji...@netspread.com>.
----- Original Message ----- 
From: "Sandeep Takhar" <sa...@yahoo.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>; "Jing
Zhou" <ji...@netspread.com>
Sent: Monday, July 07, 2003 12:15 PM
Subject: Re: Action forward to another action without form


> Also important is if you have a different form, the
> properties will be populated according to the old
> submitted parameters.

One way to solve such a problem is what I proposed
the so called Action Controller Delegation Model.
When you *find* the target action mapping according
to an action path, you invoke the execute method on
the action class directly. So the action path of the
target action mapping could become a configurable
parameter in your current action mapping in such model.

Jing

>
> sandeep
> --- Jing Zhou <ji...@netspread.com> wrote:
> > Forwarding to a target action is not considered as a
> > good practice in the past is because the form bean
> > population
> > and validation machineries will be invoked again
> > when
> > Struts process the action (and some more reasons).
> > Of course, if there is no form bean specified in the
> > target
> > action mapping,  it makes sense in such cases.
> >
> > In many use cases, I find people really need
> > *shared* action controllers in their business
> > requirements.
> > The best way to have the functionality is to develop
> > your own action controller delegation model. In such
> > a model, you *find* the target action the same way
> > as
> > Struts *find* it. It is a very simple solution and
> > you
> > could avoid the form bean populations and
> > validations.
> >
> > Jing
> > Netspread Carrier
> > http://www.netspread.com
> >
> > ----- Original Message ----- 
> > From: "Frances Aleah Z. de Guzman"
> > <ad...@ingenium.com.ph>
> > To: "Struts Users Mailing List"
> > <st...@jakarta.apache.org>
> > Sent: Sunday, July 06, 2003 9:41 AM
> > Subject: Re: Action forward to another action
> > without form
> >
> >
> > you can define it to your forward in your
> > struts-config, instead of
> > forwarding
> > it to a page, forward it to an action. but this is
> > not a good practice
> > though.
> >
> > On Monday 07 July 2003 10:31 am, Benjamin Stewart
> > wrote:
> > > Can you point me in the right direction, none of
> > my books talk about it,
> > > cant find examples etc.
> > >
> > > Ben
> > >
> > > Dan Tran wrote:
> > > >Yes;)
> > > >
> > > >
> > > >----- Original Message -----
> > >
> > > From: "Benjamin Stewart"
> > <bs...@waterwerks.com.au>
> > >
> > > >Newsgroups: Struts
> > > >Sent: Sunday, July 06, 2003 6:59 PM
> > > >Subject: Action forward to another action without
> > form
> > > >
> > > >>Greetings,
> > > >> I have a form that submits values. From the
> > Action class I would (in
> > > >>some circumstances) like to go directly to
> > another action class and then
> > > >>forward to a view. Is this possible ?
> > > >>
> > > >>Thanks
> > > >>Ben
> > > >
> > >
> >
> >---------------------------------------------------------------------
> > > >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
> >
> > -- 
> > Frances Aleah Z. De Guzman
> > SA/Programmer
> > Ingenium Technology, Inc.
> > http://www.ingenium.com.ph
> >
> > Disclaimer :
> > This message is intended only for the named
> > recipient. If you are not the
> > intended recipient you are notified that disclosing,
> > copying, distributing
> > or taking any action in reliance on the contents of
> > this information is
> > strictly prohibited.
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > 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!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.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


Re: Action forward to another action without form

Posted by Sandeep Takhar <sa...@yahoo.com>.
Also important is if you have a different form, the
properties will be populated according to the old
submitted parameters.

sandeep
--- Jing Zhou <ji...@netspread.com> wrote:
> Forwarding to a target action is not considered as a
> good practice in the past is because the form bean
> population
> and validation machineries will be invoked again
> when
> Struts process the action (and some more reasons).
> Of course, if there is no form bean specified in the
> target
> action mapping,  it makes sense in such cases.
> 
> In many use cases, I find people really need
> *shared* action controllers in their business
> requirements.
> The best way to have the functionality is to develop
> your own action controller delegation model. In such
> a model, you *find* the target action the same way
> as
> Struts *find* it. It is a very simple solution and
> you
> could avoid the form bean populations and
> validations.
> 
> Jing
> Netspread Carrier
> http://www.netspread.com
> 
> ----- Original Message ----- 
> From: "Frances Aleah Z. de Guzman"
> <ad...@ingenium.com.ph>
> To: "Struts Users Mailing List"
> <st...@jakarta.apache.org>
> Sent: Sunday, July 06, 2003 9:41 AM
> Subject: Re: Action forward to another action
> without form
> 
> 
> you can define it to your forward in your
> struts-config, instead of
> forwarding
> it to a page, forward it to an action. but this is
> not a good practice
> though.
> 
> On Monday 07 July 2003 10:31 am, Benjamin Stewart
> wrote:
> > Can you point me in the right direction, none of
> my books talk about it,
> > cant find examples etc.
> >
> > Ben
> >
> > Dan Tran wrote:
> > >Yes;)
> > >
> > >
> > >----- Original Message -----
> >
> > From: "Benjamin Stewart"
> <bs...@waterwerks.com.au>
> >
> > >Newsgroups: Struts
> > >Sent: Sunday, July 06, 2003 6:59 PM
> > >Subject: Action forward to another action without
> form
> > >
> > >>Greetings,
> > >> I have a form that submits values. From the
> Action class I would (in
> > >>some circumstances) like to go directly to
> another action class and then
> > >>forward to a view. Is this possible ?
> > >>
> > >>Thanks
> > >>Ben
> > >
> >
>
>---------------------------------------------------------------------
> > >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
> 
> -- 
> Frances Aleah Z. De Guzman
> SA/Programmer
> Ingenium Technology, Inc.
> http://www.ingenium.com.ph
> 
> Disclaimer :
> This message is intended only for the named
> recipient. If you are not the
> intended recipient you are notified that disclosing,
> copying, distributing
> or taking any action in reliance on the contents of
> this information is
> strictly prohibited.
> 
> 
> 
>
---------------------------------------------------------------------
> 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!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


Re: Action forward to another action without form

Posted by Jing Zhou <ji...@netspread.com>.
Forwarding to a target action is not considered as a
good practice in the past is because the form bean population
and validation machineries will be invoked again when
Struts process the action (and some more reasons).
Of course, if there is no form bean specified in the target
action mapping,  it makes sense in such cases.

In many use cases, I find people really need
*shared* action controllers in their business requirements.
The best way to have the functionality is to develop
your own action controller delegation model. In such
a model, you *find* the target action the same way as
Struts *find* it. It is a very simple solution and you
could avoid the form bean populations and validations.

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

----- Original Message ----- 
From: "Frances Aleah Z. de Guzman" <ad...@ingenium.com.ph>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Sunday, July 06, 2003 9:41 AM
Subject: Re: Action forward to another action without form


you can define it to your forward in your struts-config, instead of
forwarding
it to a page, forward it to an action. but this is not a good practice
though.

On Monday 07 July 2003 10:31 am, Benjamin Stewart wrote:
> Can you point me in the right direction, none of my books talk about it,
> cant find examples etc.
>
> Ben
>
> Dan Tran wrote:
> >Yes;)
> >
> >
> >----- Original Message -----
>
> From: "Benjamin Stewart" <bs...@waterwerks.com.au>
>
> >Newsgroups: Struts
> >Sent: Sunday, July 06, 2003 6:59 PM
> >Subject: Action forward to another action without form
> >
> >>Greetings,
> >> I have a form that submits values. From the Action class I would (in
> >>some circumstances) like to go directly to another action class and then
> >>forward to a view. Is this possible ?
> >>
> >>Thanks
> >>Ben
> >
> >---------------------------------------------------------------------
> >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

-- 
Frances Aleah Z. De Guzman
SA/Programmer
Ingenium Technology, Inc.
http://www.ingenium.com.ph

Disclaimer :
This message is intended only for the named recipient. If you are not the
intended recipient you are notified that disclosing, copying, distributing
or taking any action in reliance on the contents of this information is
strictly prohibited.



---------------------------------------------------------------------
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