It's not a secret anymore!*
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
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts reset method
 
Similar Threads
how to reset the field after validation using annotations(Struts 2)
2 JSP pages using the same form bean
Reseting an applet
problem with k-shell
struts servlet - old Error message on the previous submission has been added to current error messa