• 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

Setting all jsp fields to null...database data...Javaranch trigger

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please, what is the most efficient way to set all fields to null in my jsp?

I have just noticed that the reset button - HTML:RESET only clears unsubmitted data. It does not clear data retrieved from the database. Can you please shed some light on why this is the case?

I am wondering if I have to add an on click event to the reset button that forward to a mapping-->class.method-->formBean that sets all the fields to null in the formBean.

Note: My action class, extends MappingDispatchAction.


Furthermore, is there a trigger in Javaranch that I can switch on, so that when I log in, all my postings and the ones that I have responded to will automitically come into view?

Thank you.

Ola.
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Usually resets in a browser don't clear the values, they reset them to the originals from when the page loaded.

If you view the source of the html in your browser you will notice that many of the input tags have a value attribute. This is the value that the forms "resets" to.
 
Tokunbo Oke
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Noted. Thanks.
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
on reset you can drop the bean reference from the session or have a clearValues method in your bean that will clear all bean values.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic