File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes resetting form view values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "resetting form view values" Watch "resetting form view values" New topic

resetting form view values

Chris Pat
Ranch Hand

Joined: Aug 27, 2005
Posts: 156
This is a problem I am having w/ struts. I have a page, results_list1.jsp that has an href that calls, add1.jsp. Add1.jsp is the view for the data fields of the object. Add1.jsp has a submit that calls Add1Action. I have an Add1Form w/ Reset method, that is the configured form bean for the Add1Action in the struts-config.xml. The problem is if I attempt to make a second entry off results_list1.jsp with the add1.jsp, the old values are still there. The first time through should not the Add1Form bean have reset the values so the second time add1.jsp comes up they are all blank or their default from the Reset method? How do I make either add1.jsp, Add1Action or Add1Form, clear the values after completion so the second + invocation of add1.jsp is blank on all fields and ready for new input? Sorry for the loquaciousness.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63548

Moved to the Struts forum.

[Asking smart questions] [About Bear] [Books by Bear]
Chris Pat
Ranch Hand

Joined: Aug 27, 2005
Posts: 156
Hi Bear
Thank you for transporting me here,grin. I hope I was not too convoluted in my question. Any help/enlightment from anyone would be appreciated.
Originally posted by Bear Bibeault:
Moved to the Struts forum.
I agree. Here's the link:
subject: resetting form view values
jQuery in Action, 3rd edition