Re: Issue with checkboxes!

2006-05-07 Thread 王曾wang_zeng
you can also override the reset() method like this: public void reset(ActionMapping mapping, HttpServletRequest request){ this.initialize(); } in the dynamic form class ,there is a initialize() method which will clear all the properties. The initialize() is called only when the bean is in

Re: Issue with checkboxes!

2006-05-07 Thread Richard Yee
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 fo

Re: Issue with checkboxes!

2006-05-07 Thread Rizwan Merchant
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 ExtendedDynaValid

Re: Issue with checkboxes!

2006-05-07 Thread Rick Reumann
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 hav

Re: Issue with checkboxes!

2006-05-07 Thread Rizwan Merchant
Thanks for the responses guys! Please see end of message for follow up question :) So I get most of what you said about overriding the ActionForm. Since I am using DynaValidatorForm I will need to extend that class. Currently my form-bean definition is as follows type="org.apache.stru

Re: Issue with checkboxes!

2006-05-07 Thread Rick Reumann
王曾wang_zeng wrote: The reason is that the form bean is configed to be saved in session scope, and the reset() method is not called when the form is submitted. Rizwan, Meaning... you need to override the ActionForm reset method and set any of your ActionForm booleans to false. Then you'll be a

Re: Issue with checkboxes!

2006-05-07 Thread 王曾wang_zeng
The reason is that the form bean is configed to be saved in session scope, and the reset() method is not called when the form is submitted. -- Wang Zeng

Issue with checkboxes!

2006-05-06 Thread Rizwan Merchant
Hi, I am having issue using checkboxes with the struts framework and DynaValidatorForm. I have a userForm that contains an object called "user" and another object called "userRestrictions" (which defined permissions for that user. When I access the page for the first time all permissions are d