Yep.

In the reset method of the form, set the field for which the checkbox
applies to false (or other appropriate internal representation...). That way
if you uncheck the box (and html submits nothing), then it will become false
in the form, but if you ticked it on the screen than html will submit a
value, and this will get populated into your form as normal (overriding the
change you just made in reset()).

I didnt realise nothing was submitted for an empty text field! I though it
submitted an empty string as the value for those? You sure about that one?

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 17:22
To: Struts Users Mailing List
Subject: reflect the uncheck in the bean



Hi everybody,

When I uncheck a checkbox in an HTML form, the pair name/value don't appear
in the request, and the ActionForm bean cannot reflect this.
It's the same for a text input who's left empty.

Is there a workaround using Struts?



Gilles Vandaele


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


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

Reply via email to