Both forms don't call the same *instance* of the action class. Neither does
For each request, Struts 2 uses a different instance of the same class. Once
rendered, the action object is no longer used. If you want to retain action
> Thank you Randy.
> >They could, if it were me I would have different methods on the action
> class
> >to handle the different forms if I were to do it this way. Personally I
> >would create an action class for each form.
>
> No, I cannot do this, because both forms need to work with the same
> objects in
> a action class. First form works with some header data, and the second
> with list
> of data and show table also of such data.
> I asked this, because I wasn't sure if both forms would call the same
> instance of
> action class.
> --
> Thx, Milan Milanovic
> ----- Original Message ----
> From: Randy Burgess <
RBurgess@...>
> To: Struts Users Mailing List <
user@...>
> Sent: Tuesday, May 13, 2008 5:09:19 PM
> Subject: Re: [struts 2] Two forms for one action
>
> They could, if it were me I would have different methods on the action
> class
> to handle the different forms if I were to do it this way. Personally I
> would create an action class for each form.
>
> Regards,
> Randy Burgess
> Sr. Web Applications Developer
> Nuvox Communications
>
>
>
> > From: Milan Milanovic <
milanmilanovich@...>
> > Reply-To: Struts Users Mailing List <
user@...>
> > Date: Tue, 13 May 2008 07:58:29 -0700 (PDT)
> > To: Struts Users Mailing List <
user@...>
> > Subject: Re: [struts 2] Two forms for one action
> >
> > I have one more question about this, if I define two <s:forms> in one
> page
> > would
> > they work with the same action class ?
> >
> > --
> > Thx, Milan Milanovic
> > ----- Original Message ----
> > From: Jim Kiley <
jhkiley@...>
> > To: Struts Users Mailing List <
user@...>
> > Sent: Monday, May 12, 2008 6:15:07 PM
> > Subject: Re: [struts 2] Two forms for one action
> >
> > Milan,
> >
> > I'm not a Struts 1 guy, so this advice might not be useful to you
> (because
> > you didn't say whether this was a Struts 1 or 2 situation). But in my
> Struts
> > 2 app I have plenty of places where I have multiple <s:submit> buttons
> each
> > triggering different action methods on the same action class.
> >
> > jk
> >
> >
> > On Mon, May 12, 2008 at 12:10 PM, Milan Milanovic <
>
milanmilanovich@...>
> > wrote:
> >
> >> Or maybe I should define two submit buttons for the same form and
> action
> >> class ?
> >> --
> >> Regards, Milan
> >>
> >>
> >> ----- Original Message ----
> >> From: Milan Milanovic <
milanmilanovich@...>
> >> To: Struts Users Mailing List <
user@...>
> >> Sent: Monday, May 12, 2008 5:57:50 PM
> >> Subject: [struts 2] Two forms for one action
> >>
> >> Hi,
> >> I need to have classic master/detail jsp page, so I need actually two
> >> forms in a jsp page to works with one action class,
> >> one main form that works with main elements of my object (e.g. User
> name,
> >> surname,...) for header and another one which works
> >> with some list that belongs to my main object (e.g., User.privileges)
> >> below such header part. How can I define this ?
> >> --
> >> Thx, Milan Milanovic
> >>
> >>
> >>
> >>
> _____________________________________________________________________________
> >> _______
> >> Be a better friend, newshound, and
> >> know-it-all with Yahoo! Mobile. Try it now.
> >>
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ> >>
> >>
> >>
> >>
> >>
> _____________________________________________________________________________
> >> _______
> >> Be a better friend, newshound, and
> >> know-it-all with Yahoo! Mobile. Try it now.
> >>
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ> >>
> >
> >
> >
> > --
> > Jim Kiley
> > Technical Consultant | Summa
> > [p] 412.258.3346 [m] 412.445.1729
> >
http://www.summa-tech.com> >
> >
> >
>
>
>
> This email and any attachments ("Message") may contain legally privileged
> and/or confidential information. If you are not the addressee, or if this
> Message has been addressed to you in error, you are not authorized to read,
> copy, or distribute it, and we ask that you please delete it (including all
> copies) and notify the sender by return email. Delivery of this Message to
> any person other than the intended recipient(s) shall not be deemed a waiver
> of confidentiality and/or a privilege.
>
>
>
>
>