• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Reset button in not working

 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am new to struts and i have make a web page using struts.
I filled the form for the first time and click on RESET button then all fields get cleared.
When i submit the form but it contains errors, then obviously it will come on the same page, but now when i click RESET , then it is not clearing the fields.

Please tell me that what to do.

Regards
Gaurav
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't say that I have ever used the reset button outside of test applications. My understanding is that it resets all the values back to what they were when the page was displayed. Since you submitted the page and it was displayed back with values, then those are the values that the page will get "reset" to. It sounds like you want to clear all the fields.

If I were to implement this I would probably...use a submit button to handle the reset...set a hidden value when the user clicked that button...in the "save" action I would check the hidden value...if it is set then I would forward back to the "display" action with redirect set to true.

- Brent
reply
    Bookmark Topic Watch Topic
  • New Topic