struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (katre)
Subject Re: DynaActionForm, Boolean checkboxes, and Initial
Date Wed, 12 Oct 2005 15:53:39 GMT
Okay, I went back and created the smallest app that shows this problem.
It can be downloaded from .

The basic problem, as before, is that it is totally impossible in struts
to default a checkbox to true, and still be able to detect when it is
uncheked by a user.

Either one of two things will happen: either your reset() method does
not do anything to the value, so you get the default-checked value
because there is no parameter set to change that value, or your reset()
sets the checkbox to false, in which case it cannot be set by default,
as the form is reset right before it is displayed in the JSP (by

This is true with dyna forms and with regular ActionForm subclasses.

Someone, please prove me wrong! Tell me struts isn't this limited!  Tell
me how to fix this!  Otherwise, I'll have to go add javascript hackery
and extra hidden fields to every JSP that uses a checkbox, and that's a


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message