This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts reset method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts reset method" Watch "Struts reset method" New topic
Author

Struts reset method

Vivek Alampally
Ranch Hand

Joined: Jul 10, 2008
Posts: 67
Hi,
Can anyone please explain why reset() is used in form bean?


Thanks
Vivek Alampally
Kristof Camelbeke
Ranch Hand

Joined: Nov 28, 2001
Posts: 97
As the name suggests this method allows you to reset your form properties....

the api says it all:


Reset bean properties to their default state, as needed. This method is called before the properties are repopulated by the controller.

The default implementation does nothing. In practice, the only properties that need to be reset are those which represent checkboxes on a session-scoped form. Otherwise, properties can be given initial values where the field is declared.
 
Have you checked out Aspose?
 
subject: Struts reset method
 
jQuery in Action, 3rd edition