I'll presume that you mean, (1) you check a checkbox, (2) hit submit (3)
page redisplays with checkbox checked (4) you uncheck it (5) hit submit
(6) page displays with checkbox still checked.  The problem is that an
unchecked checkbox doesn't return any request parameter, so there's no
way for Struts to "know" to uncheck the box. You need to implement a
reset method in the ActionForm (see the javadoc). The reset method is
called before the ActionServlet populates the ActionForm from the
request parameters. So it can clear out the properties associated with
the checkbox. Then, if it is actually still checked, the ActionServlet
will repopulate.

Will


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 08, 2001 2:42 PM
Subject: Unchecking radio buttons?


>
>
> Hi.  I have a set of radio buttons.  However, if I check one of them,
I am not
> able to uncheck it!
>
> Any ideas what I am missing?
>
> Many thanks,
>
> Dave
>
>
>

Reply via email to