File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Action form doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Action form doubt" Watch "Action form doubt" New topic
Author

Action form doubt

siva swamy
Greenhorn

Joined: Jul 12, 2007
Posts: 7
I am new to struts and i am in a struts project. I have a scenario where i have to navigate along five jsp pages and finally i have to save the data collected from the user. Each page consists of around 25 fields but are related like borrower, co-borrower, loan details, lender details etc. So totally i may have around 150 fields. Is it possible to keep borrower, lender, co-borrower etc as seperate beans (value objects) so that in my action form i have only beans. In that corresponding bean i defined these fields.

Thank you.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Welcome to JavaRanch! We're glad you're here. I do need to remind you, though, that the name you are currently displaying does not meet the guidelines of the JavaRanch Naming Policy. In particular, the name you display must be a first and last name, and must not be obviously fictitious. Please change the Publicly Displayed Name in your user profile so that it meets the guidelines.

This may seem trivial to you, but it's an important part of the culture at JavaRanch, and we do appreciate your compliance with it.

Now, regarding your question:
Originally posted by siva swamynatha:
Is it possible to keep borrower, lender, co-borrower etc as seperate beans (value objects) so that in my action form i have only beans.

Yes, it is possible. Just make sure that the beans are instantiated automatically when the ActionForm is created. Then in your JSPs, you can refer to the fields with "dot notation". Example:

[ August 03, 2007: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Action form doubt