Voviya,
Could you please pick up Nadika from horse riding at 7:30 p.m. today?
A ya popletus' v Majer.
T.

Robert Graf-Waczenski wrote:
lucas owen schrieb:
Hi struts users,

I'm working with a checkbox array; the problem is that it doesn't work as a
single checkbox: I can't have the checkbox array with all checkboxes
unchecked (apart from the beginning)

Example:

I check checkbox1.
I check checkbox2.
I uncheck checkbox2 --> OK
I uncheck checkbox1 --> checkbox1 doesnt get unchecked

Is this working as normal or I'm performing wrong???

Thanks in advance
Peter

This should work correctly out of the box with Struts2 because there are interceptors and hidden parameters that work the magic for you. In Struts1, there is no such magic and the behavior you describe is normal because if none of the checkboxes is checked, then the resulting browser request does not contain the corresponding request parameters *at all*, meaning that your server-side state is unchanged. Solution: Implement the ActionForm.reset() method to deal with this properly, i.e. reset your form values to null (or whatever) when the request parameters are missing.

Robert


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to