• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Many action share form bean

 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
Thanks
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic