Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Action form doubt

 
siva swamy
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic