Not sure what you mean.

On Sat, Mar 2, 2013 at 2:58 AM, Mohit Gupta <motgu...@gmail.com> wrote:

> Ken one more thing can we use action chaining to forward the request to
> action which is not struts 2. i know action chaining shoukld be discourged
> but just exploring the options.
>
> On Sat, Mar 2, 2013 at 3:01 PM, Ken McWilliams <ken.mcwilli...@gmail.com
> >wrote:
>
> > This was already addressed on SO:
> >
> >
> http://stackoverflow.com/questions/15159827/not-setting-instance-member-value-in-destination-action-using-action-chaining
> > We explained that chain was a result and that the chaining interceptor
> did
> > not process additional parameters and so they would not be included, if
> you
> > want empMode to be true then have it as a property of the action and set
> > it's value to true before chaining and the comments also covered it is
> > generally best to avoid chain if possible.
> >
> > What is unclear?
> >
> >
> > On Sat, Mar 2, 2013 at 1:45 AM, Mohit Gupta <motgu...@gmail.com> wrote:
> >
> > > This is my struts 2 flow where i am using action chaining
> > >
> > > JSP--->Action1--->Action2--->ResultJsp
> > >
> > > With action chaining , my understanding is that request is forwarded
> from
> > > action1 to action2.So if i pass some parameter from action1 to action 2
> > > it should be set in new action instance variable(/value stack created
> for
> > > new action).But its not happening
> > >
> > > Below is my code in action1
> > >
> > >
> > >     @Result(name = "displayEmployee",type = "chain",
> > >             params = {
> > >                 "namespace", "/employee",
> > >                 "actionName", "Employee-lookup!search",
> > >                 "empMode", "true"
> > >
> > >             })
> > >
> > >
> > >     @Action("display-employee!displayEmployee")
> > >       public String displayEmployee() {
> > >         return "displayEmployee";
> > >       }
> > >
> > > Now in Action 2 i.e display-employee , i have boolean property with
> name
> > > empMode. But i get the value as false though i should get it true
> > > because i am passing it as attribute in result annotation. As my
> > > understanding in action chaining, all request paramaters are
> > > forwarded from action1 to action2. Basically new value stack is created
> > for
> > > action2 which contains the variables which were present
> > > in action1. So why value true is not set for empMode property in action
> > 2?
> > >
> >
>

Reply via email to