You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ha...@informatiefabriek.nl on 2003/05/08 17:02:54 UTC

How to set checkbox checked

Hi all,

How can I set a checkbox selected by default using the <html:checkbox> 
syntax?

Thanks, 

Harm de Laat
Informatiefabriek
The Netherlands


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


RE: How to set checkbox checked

Posted by Joseph Yang <ya...@rewardstream.com>.
That's correct,

e.g, on the page, the check box property is contactMe

then inside actionForm, you go:

boolean contactMe = false; (if you want the check box checked by default,
set this to true)

public void setContactMe or public boolean getContactMe...


-----Original Message-----
From: Steven Sajous [mailto:steve@dotmarketing.com]
Sent: Thursday, May 08, 2003 9:19 AM
To: Struts Users Mailing List; yangj@rewardstream.com
Subject: RE: How to set checkbox checked


when I do that by the way I have to keep the getter method for the boolean
as getProperty() and not like isProperty() right?

-----Original Message-----
From: Joseph Yang [mailto:yangj@rewardstream.com]
Sent: Thursday, May 08, 2003 12:13 PM
To: 'Struts Users Mailing List'
Subject: RE: How to set checkbox checked


Set up a boolean bean property and set it to true before display the page...

-----Original Message-----
From: harm@informatiefabriek.nl [mailto:harm@informatiefabriek.nl]
Sent: Thursday, May 08, 2003 8:03 AM
To: struts-user@jakarta.apache.org
Subject: How to set checkbox checked


Hi all,

How can I set a checkbox selected by default using the <html:checkbox>
syntax?

Thanks,

Harm de Laat
Informatiefabriek
The Netherlands


---------------------------------------------------------------------
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



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


RE: How to set checkbox checked

Posted by Steven Sajous <st...@dotmarketing.com>.
when I do that by the way I have to keep the getter method for the boolean
as getProperty() and not like isProperty() right?

-----Original Message-----
From: Joseph Yang [mailto:yangj@rewardstream.com]
Sent: Thursday, May 08, 2003 12:13 PM
To: 'Struts Users Mailing List'
Subject: RE: How to set checkbox checked


Set up a boolean bean property and set it to true before display the page...

-----Original Message-----
From: harm@informatiefabriek.nl [mailto:harm@informatiefabriek.nl]
Sent: Thursday, May 08, 2003 8:03 AM
To: struts-user@jakarta.apache.org
Subject: How to set checkbox checked


Hi all,

How can I set a checkbox selected by default using the <html:checkbox>
syntax?

Thanks,

Harm de Laat
Informatiefabriek
The Netherlands


---------------------------------------------------------------------
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: How to set checkbox checked

Posted by Joseph Yang <ya...@rewardstream.com>.
Set up a boolean bean property and set it to true before display the page...

-----Original Message-----
From: harm@informatiefabriek.nl [mailto:harm@informatiefabriek.nl]
Sent: Thursday, May 08, 2003 8:03 AM
To: struts-user@jakarta.apache.org
Subject: How to set checkbox checked


Hi all,

How can I set a checkbox selected by default using the <html:checkbox> 
syntax?

Thanks, 

Harm de Laat
Informatiefabriek
The Netherlands


---------------------------------------------------------------------
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