Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

Re: [struts 2] Two forms for one action

Randy Burgess

2008-05-13

Replies:

Author LoginPost Reply
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@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Tue, 13 May 2008 07:58:29 -0700 (PDT)
> To: Struts Users Mailing List <user@(protected)>
> 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@(protected)>
> To: Struts Users Mailing List <user@(protected)>
> 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@(protected)>
> wrote:
>
>> Or maybe I should define two submit buttons for the same form and action
>> class ?
>> --
>> Regards, Milan
>>
>>
>> ----- Original Message ----
>> From: Milan Milanovic <milanmilanovich@(protected)>
>> To: Struts Users Mailing List <user@(protected)>
>> 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.
©2008 gg3721.com - Jax Systems, LLC, U.S.A.