There is a suspicious bug on the CheckboxTag. Infact i can specify a value
that is rendered as  attribute on the INPUT html tag, to overwrite the
default "on" value.
But if i specify a value, check box is not rendered correctly.

In the doStartTag method, to render the checkbox as checked, are tested
condition for "yes", "true" and "on" values, but not for the "value"
instance variable.
original code is:

if (checked.equalsIgnoreCase("true")
            || checked.equalsIgnoreCase("yes")
            || checked.equalsIgnoreCase("on"))
results.append(" checked=\"checked\"");

I think that correct code is :

if (checked.equalsIgnoreCase("true")
            || checked.equalsIgnoreCase("yes")
            || checked.equalsIgnoreCase("on")
            || checked.equalsIgnoreCase(this.value))
results.append(" checked=\"checked\"");


--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>

Reply via email to