Thanks. Yeah i did that i have reset the default values in my Action code, but the problem is reset method gets called everytime... That is after the default is set, the reset is called before the form is populated and all teh default values again gets set to false.
Below is my code, i don't understand why this reset gets called so many times... public void reset(ActionMapping mapping, HttpServletRequest request) { this.selectedClient[0] = false; } -----Original Message----- From: Leahy, Kevin [mailto:[EMAIL PROTECTED] Sent: Friday, December 23, 2005 10:52 AM To: 'Struts Users Mailing List' Subject: RE: Checkboxes... The reset() method is called first. Then the form is populated from the request and then your Action code executes. You can set them false in reset() method and then reset the default values in the Action code. The reason you have to do this for check boxes is that HTML forms don't submit anything when the checkbox is off. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 23 December 2005 15:27 To: user@struts.apache.org Subject: RE: Checkboxes... If i make them false in reset method, i cannot set any checkboxes by defalut to checked.. everytime the checkboxes are unchecked....if i add reset method... -----Original Message----- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Thursday, December 22, 2005 10:54 PM To: Struts Users Mailing List Subject: Re: Checkboxes... On 12/22/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Even though teh default boxes are unchecked, they are coming as > selected in the java code. > > How can i unselect them... Are you setting them to false in the 'reset' method of your form bean, as described in the documentation? http://struts.apache.org/struts-taglib/tagreference-struts-html.html#html:ch eckbox "WARNING: 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." -- Wendy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ------ -------------------------------------------------------------------------------- The information contained herein is confidential and is intended solely for the addressee. Access by any other party is unauthorised without the express written permission of the sender. If you are not the intended recipient, please contact the sender either via the company switchboard on +44 (0)20 7623 8000, or via e-mail return. If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. 3166 -------------------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]