aspose file tools*
The moose likes Struts and the fly likes just a question regarding ActionForm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "just a question regarding ActionForm" Watch "just a question regarding ActionForm" New topic
Author

just a question regarding ActionForm

kay lin
Ranch Hand

Joined: May 20, 2004
Posts: 132
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
Leandro Melo
Ranch Hand

Joined: Mar 27, 2004
Posts: 401
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()".


Leandro Melo
SCJP 1.4, SCWCD 1.4
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: just a question regarding ActionForm