struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Evans (JIRA)" <>
Subject [jira] Reopened: (STR-80) Two problems with the <struts:checkbox> tag
Date Tue, 25 Apr 2006 03:04:10 GMT
     [ ]
David Evans reopened STR-80:

> Two problems with the <struts:checkbox> tag
> -------------------------------------------
>          Key: STR-80
>          URL:
>      Project: Struts Action 1
>         Type: Bug

>   Components: Taglibs
>     Versions: 1.0 Beta 1
>  Environment: Operating System: All
> Platform: All
>     Reporter: Martin Cooper
>     Assignee: Craig McClanahan

> There are two serious, and interrelated, problems with the <struts:checkbox> 
> tag.
> 1) The tag does not generate a "value" attribute for the <input> tag. As far as

> I can tell, this attribute is required by the HTML 4.01 spec. The "value" 
> attribute passed to the Struts tag is used only for determining whether or not 
> to set the "checked" attribute.
> 2) The "checked" state of the <input> tag is determined only from the "value" 
> attribute of the <struts:checkbox> tag, and it will only be checked if that 
> value is "yes", "on" or "true". This causes a problem when the same checkbox 
> name is used with multiple different values. (This can be used to implement 
> checkboxes as a column in a dynamically generated table, where the value 
> represents the item(s) that was checked.) It becomes impossible to initialize 
> the state to checked, because the use of the "value" is being overloaded.
> It seems to me that the <struts:checkbox> should have two attributes instead of

> just the "value" attribute:
> value: specifies the "value" attribute of the generated <input> tag
> checked: specifies whether or not the checkbox should be initially checked.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message