struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Miller" <chris_overs...@hotmail.com>
Subject Re: checkboxes
Date Mon, 09 Oct 2000 08:00:12 GMT
Hi Simon,

I agree that support for improved checkbox handling needs to be incorporated
into struts. However the approach you have suggested below does have a
flaw - namely that if you try to implement a multi-part form (ie wizard)
using this approach, some extra care is required to ensure that only the
current page's checkboxes are reset.
There have however been several submissions from myself and others that take
a variety of different approaches to the checkbox problem, so hopefully
we'll see something included soon.

----- Original Message -----
From: "Simon Oldeboershuis" <sol@outermedia.de>
To: <struts-dev@jakarta.apache.org>
Sent: Friday, October 06, 2000 1:55 PM
Subject: checkboxes


> Hi there,
>
> we have a problem with checkboxes. If I understood it right, the setter
> won't be called if the checkbox is not checked. I do know that http
> forms do not submit unchecked checkboxes, but there must be a workaround
> for struts!
>
> My suggestion is to add an special init method to the ValidatingForm
> which is ALWAYS called BEFORE the parameters are set. In that method one
> could set ALL the checkbox parameters to false... the checkboxes which
> are checked will override this when the parameters are evaluated! The
> developer has to watch the type of input of the form closely for
> changes!
>
> A more transparent approach would be better. The checkbox-Tag would have
> to write something into the session for later evaluation by the
> ActionServlet.
>
> Please let me know if something like this is planned for the next
> version or how one could help!
>
> thanx!
> simon
>

Mime
View raw message