This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes Many action share form bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Many action share form bean" Watch "Many action share form bean" New topic

Many action share form bean

amit sharma
Ranch Hand

Joined: Jul 19, 2006
Posts: 129
I want to know what are the different ways of using same form bean in many actions and what are the limitations ,advantages ,disadvantages of using this method.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The only time I'd recommend using the same form bean for multiple actions is if you're building a "wizard" where the user enters information through multiple pages and does a "save" operation when finished.

One big disadvantage to using a single form bean for multiple actions is that it makes it much more difficult to validate data, either with your own code or using the Validation Framework. Besides that, there's just the general awkwardness of having a lot of extra properties in the form that you don't need for the current page.

Consultant, Sima Solutions
Have you checked out Aspose?
subject: Many action share form bean
It's not a secret anymore!