struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillermo Meyer" <gme...@interbanking.com.ar>
Subject RE: Problem with <html:checkbox>
Date Wed, 21 Apr 2004 12:14:50 GMT
And what happens when you are using a DispatchAction and a session
scoped form? If you are in a wizard use case, where you go forwards and
backwards in a screen sequence using Dispatch action and session scoped
form, if in the first screen you set the checkbox on and then you want
to go back and unset it, you should check in the request.getParameter()
if it is null to set it to false (according to Rajani's reply), because
the ActionForm getter for the boolean property won't be populated. Am I
right? Should it be placed in thge reset method of that ActionForm?

-----Original Message-----
From: Takhar, Sandeep [mailto:Sandeep.Takhar@CIBC.ca] 
Sent: MiƩrcoles, 21 de Abril de 2004 09:11 a.m.
To: Struts Users Mailing List
Subject: RE: Problem with <html:checkbox>


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

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas
en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii)
amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su
autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado,
uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad
ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este
mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo
inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar,
revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es
el destinatario. Muchas gracias.



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


Mime
View raw message