You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mike Thompson <mi...@calebtech.com> on 2003/04/07 15:17:23 UTC
RE: html:checkbox problem
Read the manual. Implement reset in form. Set property value to false.
--m
-----Original Message-----
From: ashokd [mailto:ashokd@visualsoft-tech.com]
Sent: Monday, April 07, 2003 8:24 AM
To: Struts
Subject: html:checkbox problem
Hi,
I have been facing some porblem with <html:checkbox>
I have a property for checkbox and I have given property data type in ActionForm as boolean.
1. First time when the checkbox is unchecked and submitted the form, I got the property value got as false. Good, It is correct behaviour.
2. If I select the checkbox and submit the form, I am getting True. It is also correct behaviour.
But the problem is:
After 2nd action explained above, if I unchecked the checkbox and submit the Form, I am getting True value and also the checkbox's being checked in the form also.
Can any one help on this issue?
Thanks & Regards,
Ashok.D
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: html:checkbox problem
Posted by Ian Hunter <ih...@hunterweb.net>.
That's the wrong signature for reset -- try
public void reset (ActionMapping mapping, HttpServletRequest request) {
----- Original Message -----
From: "ashokd" <as...@visualsoft-tech.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>;
<mi...@calebtech.com>
Sent: Monday, April 07, 2003 9:56 AM
Subject: Re: html:checkbox problem
> Hi,
>
> I kept reset method as below:
> public void reset() {
> System.out.println("Reset Method is Calling");
> mCheckboxProperty = false;
> }
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: html:checkbox problem
Posted by Nicolas De Loof <ni...@cgey.com>.
As reset() has a base implementation in ActionForn, you must add a reset method with this signature :
reset(ActionMapping mapping, ServletRequest request);
Nico.
> Hi,
>
> I kept reset method as below:
> public void reset() {
> System.out.println("Reset Method is Calling");
> mCheckboxProperty = false;
> }
>
> I noticed that reset method is not calling at any time.
>
> Thanks & Regards,
> Ashok.D
> ----- Original Message -----
> From: "Mike Thompson" <mi...@calebtech.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Monday, April 07, 2003 6:47 PM
> Subject: RE: html:checkbox problem
>
>
> > Read the manual. Implement reset in form. Set property value to false.
> > --m
> >
> >
> > -----Original Message-----
> > From: ashokd [mailto:ashokd@visualsoft-tech.com]
> > Sent: Monday, April 07, 2003 8:24 AM
> > To: Struts
> > Subject: html:checkbox problem
> >
> >
> > Hi,
> >
> > I have been facing some porblem with <html:checkbox>
> >
> > I have a property for checkbox and I have given property data type in
> ActionForm as boolean.
> >
> > 1. First time when the checkbox is unchecked and submitted the form, I
> got the property value got as false. Good, It is correct behaviour.
> >
> > 2. If I select the checkbox and submit the form, I am getting True. It
> is also correct behaviour.
> >
> > But the problem is:
> > After 2nd action explained above, if I unchecked the checkbox and
> submit the Form, I am getting True value and also the checkbox's being
> checked in the form also.
> >
> > Can any one help on this issue?
> >
> > Thanks & Regards,
> > Ashok.D
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: html:checkbox problem
Posted by ashokd <as...@visualsoft-tech.com>.
Hi,
I kept reset method as below:
public void reset() {
System.out.println("Reset Method is Calling");
mCheckboxProperty = false;
}
I noticed that reset method is not calling at any time.
Thanks & Regards,
Ashok.D
----- Original Message -----
From: "Mike Thompson" <mi...@calebtech.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, April 07, 2003 6:47 PM
Subject: RE: html:checkbox problem
> Read the manual. Implement reset in form. Set property value to false.
> --m
>
>
> -----Original Message-----
> From: ashokd [mailto:ashokd@visualsoft-tech.com]
> Sent: Monday, April 07, 2003 8:24 AM
> To: Struts
> Subject: html:checkbox problem
>
>
> Hi,
>
> I have been facing some porblem with <html:checkbox>
>
> I have a property for checkbox and I have given property data type in
ActionForm as boolean.
>
> 1. First time when the checkbox is unchecked and submitted the form, I
got the property value got as false. Good, It is correct behaviour.
>
> 2. If I select the checkbox and submit the form, I am getting True. It
is also correct behaviour.
>
> But the problem is:
> After 2nd action explained above, if I unchecked the checkbox and
submit the Form, I am getting True value and also the checkbox's being
checked in the form also.
>
> Can any one help on this issue?
>
> Thanks & Regards,
> Ashok.D
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org