Thanks Rick.
I have 6 checkboxes in that session scope form and 5 of them behave fine
(I can set or unset them), only one of them acts funny and cannot be
reset to false.
Any idea why this would be happening..just curious!
Rick Reumann wrote:
Rizwan Merchant wrote:
and in ExtendedDynaValidatorForm I would have a reset() method as
follows
public void reset(ActionMapping mapping, HttpServletRequest request){
super.reset();
//not sure what goes here
}
So my next question is..how to I reset all the booleans in the form?
Do I have to explicitly reset each of them, or is there a generic way
to iterate through all of them and reset them? If possible, can I see
some sample code please?
The code above is correct. I just manually set them to false..
public void reset(ActionMapping mapping, HttpServletRequest request){
myBoolProperty = false;
myOtherBoolProperty = false;
super.reset();
}
I suppose if you had a ton of boolean properties you could do some
sort of reflection to look for booleans and set them to false, but I
haven't bothered with that.
Also remember, you only need to do this if your ActionForm has session
scope.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]