aspose file tools*
The moose likes Struts and the fly likes Regarding Action forms Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Regarding Action forms" Watch "Regarding Action forms" New topic
Author

Regarding Action forms

Muralitharan Pannerselvam
Greenhorn

Joined: Jun 07, 2006
Posts: 15
Hi all,

In my application a jsp contains an input form which is mapped to a ActionForm and a action class.Now my requirement is to have similar 3 more input forms in the same page.But my action class will be same.How to handle this scenario?


How to handle array of Actionforms in the Action Class?


Thanks and Regards,<br />Muralitharan P
Nacho Espinosa
Ranch Hand

Joined: Jan 17, 2007
Posts: 30
Try with DispatchAction.

Check the documentation about this.


Greetings<br />Nacho Espinosa<br />SCJP 1.4
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Your html/jsp page can have multiple forms, but clicking the submit button will only submit one of the forms. An action only gets one form passed in to the execute method. Maybe if you described your situation in more detail somebody could provide you with a solution.

- Brent
Muralitharan Pannerselvam
Greenhorn

Joined: Jun 07, 2006
Posts: 15
HI all,

For example consider this, previously my jsp page had three fields namely name,id and address which i have mapped to a action form with three properties. Now my requirement is that i want to have three more set of fields like that. How can i handle this in action form other than creating seperate properties for the remaining three sets. i also want to have all the four sets of values in my action class.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regarding Action forms