aspose file tools
The moose likes Struts and the fly likes populated  form fields Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "populated  form fields" Watch "populated  form fields" New topic
Author

populated form fields

Anand Gondhiya
Ranch Hand

Joined: Feb 24, 2004
Posts: 155
Hi All,
I use Weblogic 8 , struts 1.1 on win2000

I submit the form on itself. i.e educationalBackground.jsp submits and comes back to educationalBackground.jsp.

Now After successful submission when It comes back to same page , the form fields are populated with most recent values !!!

I can certainly call "formReset()" in javascript to set values to nulls...but is there any other way ?
Thanks
-Anand.
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4725

You could have your Action either call the reset method on the form when it is done with it or the Action can remove the ActionForm from scope (it is stored as an attribute under the key of what name you gave the form-bean in struts-config.xml.


A good workman is known by his tools.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: populated form fields
 
Similar Threads
session issue
Calling a controller method without reloading whole page
Actionform not populating JSP
Stripes: how to avoid repopulating a textfield
Form Data not being populated in Struts 2