You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Hardik Shah <ha...@yahoo.com> on 2008/10/07 07:22:58 UTC
how to pass parameter in next action
can anybody say how to pass or push parameter in valuestack and get it from
another action in struts 2
really confused with all valuestack stuff
suppose
i have
----------------------------------------------------
<action name="AddComboValue"
class="com.docmgmt.struts.actions.attribute.SaveAttribute"
method="AddComboValue">
<result>/attribute/AttribComboValue.jsp</result>
</action>
<action name="AddAttribute"
class="com.docmgmt.struts.actions.attribute.SaveAttribute">
<result type="redirect-action">attriblist</result>
<result name="ComboForm" type="redirect-action">AddComboValue</result>
</action>
-------------------------------------------------------
i want to put my one parameter attrid in request scope when executing
AddAttribute action if result type ComboForm and want to get from
AddComboValue action java file in struts 2.0.11.2
can anybody gives me a way?
thanks in advance
--
View this message in context: http://www.nabble.com/how-to-pass-parameter-in-next-action-tp19851255p19851255.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: how to pass parameter in next action
Posted by Mead Lai <la...@gmail.com>.
It's same like the parameter from jsp page.
AddComboValue?parm1=${value}
in your Action declare a
public String parm1;
getParm1()
setParm1()
now just use parm1 the get the value.
good luck.
On Tue, Oct 7, 2008 at 2:38 PM, Hardik Shah <ha...@yahoo.com> wrote:
>
> Thanks for reply
>
> and how i can get this parameter in my addattribute action java file
>
> using actioncontext or what?
>
>
>
>
> Mead Lai wrote:
> >
> > <action name="AddAttribute"
> > class="com.docmgmt.struts.actions.attribute.SaveAttribute">
> > <result type="redirect-action">attriblist</result>
> > <result name="ComboForm"
> > type="redirect-action">AddComboValue?parm1=${value}</result>
> > </action>
> >
> > append the actionName "AddComboValue?parm1=${value}", but no ".action".
> > It's OK!
> >
> >
> > On Tue, Oct 7, 2008 at 1:22 PM, Hardik Shah <ha...@yahoo.com>
> wrote:
> >
> >>
> >> can anybody say how to pass or push parameter in valuestack and get it
> >> from
> >> another action in struts 2
> >>
> >> really confused with all valuestack stuff
> >>
> >> suppose
> >>
> >> i have
> >>
> >> ----------------------------------------------------
> >> <action name="AddComboValue"
> >> class="com.docmgmt.struts.actions.attribute.SaveAttribute"
> >> method="AddComboValue">
> >> <result>/attribute/AttribComboValue.jsp</result>
> >>
> >> </action>
> >>
> >> <action name="AddAttribute"
> >> class="com.docmgmt.struts.actions.attribute.SaveAttribute">
> >> <result type="redirect-action">attriblist</result>
> >> <result name="ComboForm"
> >> type="redirect-action">AddComboValue</result>
> >> </action>
> >>
> >> -------------------------------------------------------
> >>
> >> i want to put my one parameter attrid in request scope when executing
> >> AddAttribute action if result type ComboForm and want to get from
> >> AddComboValue action java file in struts 2.0.11.2
> >>
> >> can anybody gives me a way?
> >> thanks in advance
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/how-to-pass-parameter-in-next-action-tp19851255p19851255.html
> >> Sent from the Struts - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
> >
> > --
> > BestRegards,
> > Mead
> > http://yayisoft.com
> >
> > Dick Cavett - "If your parents never had children, chances are you won't
> > either."
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/how-to-pass-parameter-in-next-action-tp19851255p19851925.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
BestRegards,
Mead
http://yayisoft.com
Everett Dirksen - "A billion here and a billion there, and soon you're
talking about real money."
Re: how to pass parameter in next action
Posted by Hardik Shah <ha...@yahoo.com>.
Thanks for reply
and how i can get this parameter in my addattribute action java file
using actioncontext or what?
Mead Lai wrote:
>
> <action name="AddAttribute"
> class="com.docmgmt.struts.actions.attribute.SaveAttribute">
> <result type="redirect-action">attriblist</result>
> <result name="ComboForm"
> type="redirect-action">AddComboValue?parm1=${value}</result>
> </action>
>
> append the actionName "AddComboValue?parm1=${value}", but no ".action".
> It's OK!
>
>
> On Tue, Oct 7, 2008 at 1:22 PM, Hardik Shah <ha...@yahoo.com> wrote:
>
>>
>> can anybody say how to pass or push parameter in valuestack and get it
>> from
>> another action in struts 2
>>
>> really confused with all valuestack stuff
>>
>> suppose
>>
>> i have
>>
>> ----------------------------------------------------
>> <action name="AddComboValue"
>> class="com.docmgmt.struts.actions.attribute.SaveAttribute"
>> method="AddComboValue">
>> <result>/attribute/AttribComboValue.jsp</result>
>>
>> </action>
>>
>> <action name="AddAttribute"
>> class="com.docmgmt.struts.actions.attribute.SaveAttribute">
>> <result type="redirect-action">attriblist</result>
>> <result name="ComboForm"
>> type="redirect-action">AddComboValue</result>
>> </action>
>>
>> -------------------------------------------------------
>>
>> i want to put my one parameter attrid in request scope when executing
>> AddAttribute action if result type ComboForm and want to get from
>> AddComboValue action java file in struts 2.0.11.2
>>
>> can anybody gives me a way?
>> thanks in advance
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/how-to-pass-parameter-in-next-action-tp19851255p19851255.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
> --
> BestRegards,
> Mead
> http://yayisoft.com
>
> Dick Cavett - "If your parents never had children, chances are you won't
> either."
>
>
--
View this message in context: http://www.nabble.com/how-to-pass-parameter-in-next-action-tp19851255p19851925.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: how to pass parameter in next action
Posted by Mead Lai <la...@gmail.com>.
<action name="AddAttribute"
class="com.docmgmt.struts.actions.attribute.SaveAttribute">
<result type="redirect-action">attriblist</result>
<result name="ComboForm"
type="redirect-action">AddComboValue?parm1=${value}</result>
</action>
append the actionName "AddComboValue?parm1=${value}", but no ".action".
It's OK!
On Tue, Oct 7, 2008 at 1:22 PM, Hardik Shah <ha...@yahoo.com> wrote:
>
> can anybody say how to pass or push parameter in valuestack and get it from
> another action in struts 2
>
> really confused with all valuestack stuff
>
> suppose
>
> i have
>
> ----------------------------------------------------
> <action name="AddComboValue"
> class="com.docmgmt.struts.actions.attribute.SaveAttribute"
> method="AddComboValue">
> <result>/attribute/AttribComboValue.jsp</result>
>
> </action>
>
> <action name="AddAttribute"
> class="com.docmgmt.struts.actions.attribute.SaveAttribute">
> <result type="redirect-action">attriblist</result>
> <result name="ComboForm"
> type="redirect-action">AddComboValue</result>
> </action>
>
> -------------------------------------------------------
>
> i want to put my one parameter attrid in request scope when executing
> AddAttribute action if result type ComboForm and want to get from
> AddComboValue action java file in struts 2.0.11.2
>
> can anybody gives me a way?
> thanks in advance
>
>
>
> --
> View this message in context:
> http://www.nabble.com/how-to-pass-parameter-in-next-action-tp19851255p19851255.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
BestRegards,
Mead
http://yayisoft.com
Dick Cavett - "If your parents never had children, chances are you won't
either."