This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes Resetting the struts actionform to default values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Resetting the struts actionform to default values" Watch "Resetting the struts actionform to default values" New topic
Author

Resetting the struts actionform to default values

Rama Krishna
Ranch Hand

Joined: Oct 16, 2007
Posts: 110
What is the correct way to reset the complete actionform.

I have more than 20 fields which are initialized as



in the form that extends the ActionForm itself. Whereas in the action class, I have to explicitly call another method in this actionform to reset all of the fields to their default values? i.e., in the above form, I would like to reset my form fields
Name to ""
Status to "loggedIn"
someInt to 0
and so on..


does not work either.

Any suggestions in this regards?

-Thanks
Rama
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Resetting the struts actionform to default values