You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Dan R. Olsen III" <da...@gmail.com> on 2009/10/03 00:18:40 UTC
Setting a checkbox
I have the following tag:
<s:checkbox id="termsofservice" name="isChecked" fieldValue ="true" />
isChecked is a boolean variable that is set in the action. When I put a
variable in the name field for a textfield tag it will bring up the
value of the variable in the text box. I want the checkbox above to be
checked if isChecked is true and not checked if isChecked is false. All
the examples I have found have not worked for me. Any extra help would
be appreciated. I'm sure it is something simple that I am missing.
RE: Setting a checkbox
Posted by Lee Clemens <ja...@leeclemens.net>.
You may need a getter method isIsChecked() or getIsChecked()
-----Original Message-----
From: Dan R. Olsen III [mailto:daneclab@gmail.com]
Sent: Friday, October 02, 2009 6:19 PM
To: Struts Users Mailing List
Subject: Setting a checkbox
I have the following tag:
<s:checkbox id="termsofservice" name="isChecked" fieldValue ="true" />
isChecked is a boolean variable that is set in the action. When I put a
variable in the name field for a textfield tag it will bring up the
value of the variable in the text box. I want the checkbox above to be
checked if isChecked is true and not checked if isChecked is false. All
the examples I have found have not worked for me. Any extra help would
be appreciated. I'm sure it is something simple that I am missing.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org