Brilliant.

Thanks for the help.

Kind regards,
--
Marc

-----Original Message-----
From: Rajani [mailto:[EMAIL PROTECTED]
Sent: 21 April 2004 09:43
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Problem with <html:checkbox>


Hi,

The problem is, when the checkbox is unchecked, the value passed is null and
not false.
So in the action class you should check if the form bean checbox property is
null...then set it to false explicitly.

Regards
Rajani
-----Original Message-----
From: Marc L. Veary [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 21, 2004 1:53 PM
To: 'Struts Users Mailing List'
Subject: Problem with <html:checkbox>


Hi All,

I have a JSP with the following:

    <html:checkbox name="<%=formBean%>" property="regulated"
value="true"><bean:message
key="product.prompt.regulated"/></html:checkbox>&nbsp;
    <html:checkbox name="<%=formBean%>" property="certRequired"
value="true"><bean:message
key="product.prompt.cert_required"/></html:checkbox>

The problem is this:

The appropriate Form Bean setters are called when setting the checkboxes
(i.e. when ticking them), but not with unsetting them and I can't seem to
figure out why.  The setters/getters in Form Bean take and return 'boolean'.

Does anyone have any thoughts on this?

Many thanks in advance.

Kind regards,
--
Marc


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


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


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

Reply via email to