> From: Dean A. Hoover [mailto:[EMAIL PROTECTED] 
> I don't quite understand how DynaActionForm
> gets populated when a form is submitted. The
> form I have gets processed exactly as I expect,
> except for a group of checkboxes

(This is a FAQ-- the answer is in the list archives multiple times.)

Un-checked checkboxes are not successful form elements and will not be
present in the request.  

You need to clear all of the checkboxes prior to Struts' populating the
form from the request.  There are several ways to do this, the most
popular of which is to override the 'reset' method and set the checkbox
properties to false.  With dynamic forms, there's an 'initialize' method
that will initialize the form based on the info in struts-config.xml.
You can call that from 'reset'.  If you are using DynaActionForm
directly, you'll need to subclass it to provide the 'reset' method.

If you don't do this, as you've noticed, it's impossible to ever
un-check a checkbox on your form.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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

Reply via email to