This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "resetting form view values" Watch "resetting form view values" New topic
Author

resetting form view values

Chris Pat
Ranch Hand

Joined: Aug 27, 2005
Posts: 156
Hello
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
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

Moved to the Struts forum.


[Asking smart questions] [Bear's FrontMan] [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: http://aspose.com/file-tools
 
subject: resetting form view values
 
Similar Threads
Form beans values transferred to another form bean
enctype="multipart/form-data" request.getParameter() issue
Form Bean - Session Scope
Submitted Form values are repeated across
Validating some extra fields of action form not in my jsp?