Rizwan,
Have you tried using a source level debugger to watch the value of the boolean in the reset method?

You should also view the source of your page to make sure the checkbox has the right name.

-Richard


Rizwan Merchant wrote:

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]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to