This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes How would I include reset() for DynaValidatorForm    Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How would I include reset() for DynaValidatorForm    " Watch "How would I include reset() for DynaValidatorForm    " New topic
Author

How would I include reset() for DynaValidatorForm

john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
In the Struts docs it states "In order to correctly recognize unchecked checkboxes, the ActionForm bean associated with this form must include a statement setting the corresponding boolean property to false in the reset() method." How would I go about doing this if Im using org.apache.struts.validator.DynaValidatorForm? Thank you for your time.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
It should work just to set an initial value like this:

<form-property name="myCheckbox" type="java.lang.Boolean" initial="false">


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How would I include reset() for DynaValidatorForm
 
Similar Threads
How to make text fields appear when checkbox is selected
I want Struts validator to ignore fields not present
Bad Sun, no biscuit!
Uncehecking a checked property
java,util.regex pains