This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

populated form fields

 
Anand Gondhiya
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic