You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Chen, Gin" <Gi...@NielsenMedia.com> on 2003/02/20 17:52:51 UTC
RE: problem in getting data from request
>From what it sounds.
PL1079DispatchAction is passed PL1820DeleteForm in the request scope and
then you submit from PL1079DispatchAction to PL1820DeleteAction.
If this is right then of course the PL1820DeleteForm is not passed as well
since by submitting to a new page you have created a new request.
If you want it in the request from PL1079DispatchAction to
PL1820DeleteAction then you have to either set it into the request scope
again or you have to put it into the session scope.
-Tim
-----Original Message-----
From: Ashish Kulkarni [mailto:kulkarni_ash1312@yahoo.com]
Sent: Thursday, February 20, 2003 11:45 AM
To: struts-user@jakarta.apache.org
Subject: problem in getting data from request
Hi,
i have the following setup
I have Action class (PL1079DispatchAction) which
populates a DynaValidatorForm (PL1820DeleteForm)and
puts it in the request, and forwards to a jsp, this
jsp has a bean defined with request scope with the
same form which was set in Action class
(PL1079DispatchAction) so i get the values set in
DynaValidatorForm in my jsp, and then from this jsp i
submit to another Action class (PL1820DeleteAction),
and in this Action class (PL1820DeleteAction) i want
the DynaValidatorForm(PL1820DeleteForm) set in my
first Action class (PL1079DispatchAction) in request,
But in the second Action class(PL1820DeleteAction) i
dont get the values set in request in my first Action
class(PL1079DispatchAction),
What wrong am i doing???
here are my definiations of in struts-config xml
<!-- form bean for mapsForm -->
<form-bean name="mapsForm"
type="org.apache.struts.validator.DynaValidatorForm"
dynamic="true">
<form-property name="nextpage"
type="java.lang.String" />
<form-property name="goto"
type="java.lang.String" />
<form-property name="select"
type="java.lang.String[]" />
</form-bean>
<!-- form bean for Pl1820Delete -->
<form-bean name="PL1820DeleteForm"
type="org.apache.struts.validator.DynaValidatorForm"
dynamic="true">
<form-property name="input1"
type="java.util.ArrayList" />
</form-bean>
<action name="mapsForm"
type="com.pfizer.maps.action.planning.PL1079DispatchAction"
validate="false"
input="/pages/planning/PL1079Display.jsp"
parameter="nextpage" scope="request"
path="/pages/planning/PL1079DispatchAction">
<forward name="add"
path="/pages/planning/PL1079Add.jsp" />
<forward name="change"
path="/pages/planning/PL1079Change.jsp" />
<forward name="delete"
path="/pages/planning/PL1079Delete.jsp" />
<forward name="home"
path="/pages/planning/PL1079Display.jsp" />
</action>
<!-- action mapping for Pl1820Delete-->
<action name="PL1820DeleteForm"
type="com.pfizer.maps.action.sop.PL1820DeleteAction"
validate="false" input="/pages/sop/PL1820Delete.jsp"
scope="request" path="/pages/sop/PL1820Delete">
<forward name="success"
path="/pages/sop/PL1820DispatchAction.do?nextpage=home"
/>
</action>
=====
A$HI$H
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.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: problem in getting data from request
Posted by Ashish Kulkarni <ku...@yahoo.com>.
Hi,
i think that is what is happeing,
i put the PL1820DeleteForm in PL1079DispatchAction ,
and forward it to a jsp and then this jsp again
sumbits to PL1820DeleteAction, so i am loosing it,
i need to put PL1820DeleteForm in request scope in
the jsp , so i will get it in PL1820DeleteAction,
Ashish
--- "Chen, Gin" <Gi...@NielsenMedia.com> wrote:
> From what it sounds.
> PL1079DispatchAction is passed PL1820DeleteForm in
> the request scope and
> then you submit from PL1079DispatchAction to
> PL1820DeleteAction.
> If this is right then of course the PL1820DeleteForm
> is not passed as well
> since by submitting to a new page you have created a
> new request.
> If you want it in the request from
> PL1079DispatchAction to
> PL1820DeleteAction then you have to either set it
> into the request scope
> again or you have to put it into the session scope.
> -Tim
>
>
>
> -----Original Message-----
> From: Ashish Kulkarni
> [mailto:kulkarni_ash1312@yahoo.com]
> Sent: Thursday, February 20, 2003 11:45 AM
> To: struts-user@jakarta.apache.org
> Subject: problem in getting data from request
>
>
> Hi,
> i have the following setup
> I have Action class (PL1079DispatchAction) which
> populates a DynaValidatorForm (PL1820DeleteForm)and
> puts it in the request, and forwards to a jsp, this
> jsp has a bean defined with request scope with the
> same form which was set in Action class
> (PL1079DispatchAction) so i get the values set in
> DynaValidatorForm in my jsp, and then from this jsp
> i
> submit to another Action class (PL1820DeleteAction),
> and in this Action class (PL1820DeleteAction) i want
> the DynaValidatorForm(PL1820DeleteForm) set in my
> first Action class (PL1079DispatchAction) in
> request,
> But in the second Action class(PL1820DeleteAction) i
> dont get the values set in request in my first
> Action
> class(PL1079DispatchAction),
> What wrong am i doing???
> here are my definiations of in struts-config xml
> <!-- form bean for mapsForm -->
> <form-bean name="mapsForm"
> type="org.apache.struts.validator.DynaValidatorForm"
> dynamic="true">
> <form-property name="nextpage"
> type="java.lang.String" />
> <form-property name="goto"
> type="java.lang.String" />
> <form-property name="select"
> type="java.lang.String[]" />
> </form-bean>
>
> <!-- form bean for Pl1820Delete -->
> <form-bean name="PL1820DeleteForm"
> type="org.apache.struts.validator.DynaValidatorForm"
> dynamic="true">
> <form-property name="input1"
> type="java.util.ArrayList" />
> </form-bean>
>
> <action name="mapsForm"
>
type="com.pfizer.maps.action.planning.PL1079DispatchAction"
> validate="false"
> input="/pages/planning/PL1079Display.jsp"
> parameter="nextpage" scope="request"
> path="/pages/planning/PL1079DispatchAction">
> <forward name="add"
> path="/pages/planning/PL1079Add.jsp" />
> <forward name="change"
> path="/pages/planning/PL1079Change.jsp" />
> <forward name="delete"
> path="/pages/planning/PL1079Delete.jsp" />
> <forward name="home"
> path="/pages/planning/PL1079Display.jsp" />
> </action>
>
> <!-- action mapping for Pl1820Delete-->
> <action name="PL1820DeleteForm"
> type="com.pfizer.maps.action.sop.PL1820DeleteAction"
> validate="false" input="/pages/sop/PL1820Delete.jsp"
> scope="request" path="/pages/sop/PL1820Delete">
> <forward name="success"
>
path="/pages/sop/PL1820DispatchAction.do?nextpage=home"
> />
> </action>
>
>
>
>
>
>
>
>
>
>
>
> =====
> A$HI$H
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.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
>
=====
A$HI$H
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org