struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Takhar, Sandeep" <Sandeep.Tak...@CIBC.ca>
Subject RE: Problem with <html:checkbox>
Date Wed, 21 Apr 2004 12:11:22 GMT
Hmmm... That is interesting because I was always under the assumption that the setter is never
called when there is no value and the only read world use of reset() is to set checkboxes
to false?

Am I wrong?

sandeep

-----Original Message-----
From: Marc L. Veary [mailto:marc@mlveary.demon.co.uk]
Sent: Wednesday, April 21, 2004 4:51 AM
To: 'Struts Users Mailing List'
Subject: RE: Problem with <html:checkbox>


Brilliant.

Thanks for the help.

Kind regards,
--
Marc

-----Original Message-----
From: Rajani [mailto:rajanikb@sysarris.soft.net]
Sent: 21 April 2004 09:43
To: Struts Users Mailing List; marc@mlveary.demon.co.uk
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:marc@mlveary.demon.co.uk]
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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


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


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

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


Mime
View raw message