You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2002/10/02 06:07:21 UTC
DO NOT REPLY [Bug 13189] New: -
html:checkbox tag should render checked if property equals value
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13189>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13189
html:checkbox tag should render checked if property equals value
Summary: html:checkbox tag should render checked if property
equals value
Product: Struts
Version: 1.1 Beta 2
Platform: All
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Custom Tags
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: saxon@company51.com
The <html:checkbox /> tag will only render checked if the property value
is "on", "true" or "yes", but the user has the option of specifying a value to
be submitted if the box if checked. If the property value matches a value
specified by the user, the checkbox should render checked.
if (checked.equalsIgnoreCase(value) // add this line please!
|| checked.equalsIgnoreCase("true")
|| checked.equalsIgnoreCase("yes")
|| checked.equalsIgnoreCase("on"))
results.append(" checked=\"checked\"");
This will allow users to use integers as the property and set the value
parameter as "1" to toggle the checkbox.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>