HTML does not submit a null for an unchecked checkbox. So if you have foo=bar you would have nothign if foo was not checked. If you try it with a GET HTML form you'll see that behavior.
-Tim -----Original Message----- From: Donald Ball [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 3:56 PM To: Struts Users Mailing List Subject: Re: question regarding DynaActionForm.reset() Wendy Smoak wrote: > Donald wrote: > >>why do you call reset() before manipulating the bean anyway? >>isn't it better to explicitly keep the old >>values around before setting any new ones based on the incoming request? > > Without reset, you'd never be able to 'un-check' an HTML checkbox. Sure you would - you'd interpret a null request parameter value for the checkbox input as un-checked, just like web programmers have always done...? it's easy to distinguish between the three incoming states: 1. form submitted, checkbox checked - foo=bar 2. form submitted, checkbox unchecked - foo= 3. user entered through something besides the form - no request parameter named foo (btw, if this issue is dead and buried, feel free to point me to an old thread or tell me to shut up. :) ) - donald --------------------------------------------------------------------- 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]