struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: checkboxes
Date Mon, 09 Oct 2000 15:42:41 GMT
Chris Miller wrote:

> 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.

The strategy I'm currently testing to deal with this is adding a reset()
to ActionForm, which is called before the bean's properties are
populated.  In a
simple (single-form) case, you would just reset the boolean representing
checkbox to false, and it will be set to true if included in the request
parameters.  For a multi-part form case, the bean will need to be smart
and only
reset the properties coming from this page -- but reset() will have
access to
the current request so that it can make this decision.

So far, this seems to work pretty well -- look for a checkin this week.


See you at ApacheCon Europe <>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat

View raw message