Hi

You need to implement the reset() method on your ActionForm and in that
setting any boolean variables to null. When you submit from a form, any
unchecked checkboxes are not sent - only checked ones. Therefor the
reset to set them to false initially, and if someon checks them they
will be set to true.

Hermod

-----Opprinnelig melding-----
Fra: Matt Bathje [mailto:[EMAIL PROTECTED]
Sendt: 26. mai 2004 00:41
Til: Struts Users Mailing List
Emne: checkbox on indexed form field


Hey all.

I have an indexed form with data that looks like this:

checkbox1, textbox1_1, textbox1_2
checkbox2, textbox2_1, textbox2_2
checkbox3, textbox3_1, textbox3_2
etc.

The checkbox is used to mark that "row" active or inactive.

If the checkbox is unchecked, and I check it, the row becomes "active"
in
the database properly.

But, if the checkbox is checked, and I uncheck it, the row does not get
marked "inactive" in the database. I can't figure out how to get this
done.

In the bean for the data, active is a boolean property that defaults to
false. (This is what I thought would be the default for an unchecked
checkbox, but it isn't working)

I am using a dynavalidatorform if that makes any difference.


Anybody have any idea? or need more information/clarification.

Thanks,
Matt Bathje


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


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that DnB NOR cannot
accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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

Reply via email to