• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

just a question regarding ActionForm

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All:
I have an ActionForm called inquiryForm, and I want to do the following, when a user FIRST access the JSP page associated with the inquiryForm bean, I want to put some default value in the text fields. BUT if the user has chosen to enter his own values, then that is fine, and when the user goes to another page, and presses the "back" button on the browser later, I want whatever he has entered to still be there, (NOT neccessarily the default value set by the form bean),

can I accomplish this by setting some of the fields in the inquiryForm in the inquiryForm constructor with some condition checking




Please let me know...
Many THANKS
 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm a beginner in Struts, but why don't you just use the Validate() method?

don't forget to "trim()" the string before "equals()".
 
Time flies like an arrow. Fruit flies like a banana. Steve flies like a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic