You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2008/07/30 23:53:31 UTC

[jira] Commented: (TOMAHAWK-1188) many HtmlCheckbox rendered with the same id with HtmlSelectManyChecbox spread layout

    [ https://issues.apache.org/jira/browse/TOMAHAWK-1188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618518#action_12618518 ] 

Leonardo Uribe commented on TOMAHAWK-1188:
------------------------------------------

This issue is quite similar to TOMAHAWK-1301, and the solution is almost the same. But on tomahawk core 1.2 there is an error on rendering (no label rendered), so I'll solve this too.

> many HtmlCheckbox rendered with the same id with HtmlSelectManyChecbox spread layout
> ------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1188
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1188
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.6
>         Environment: Tomahawk + JSF-RI 1.2.06 + Facelets
>            Reporter: Marcin Kobylarz
>            Assignee: Leonardo Uribe
>
> This piece of code:
> <t:selectManyCheckbox id="xxx" layout="spread" value="#{checkboxTest.selectedItems}">
>            <t:selectItems value="#{checkboxTest.items}" var="item" itemValue="#{item}" itemLabel="#{item}" />
> </t:selectManyCheckbox>
> <t:checkbox id="item1" for="xxx" index="0"></t:checkbox>
> <t:checkbox id="item2" for="xxx" index="1"></t:checkbox>
> causes  all the checkboxes to be rendered to html with the same id. This violates html object id uniqueness.
> Solution:
> --- tomahawk_1.1.6/org/apache/myfaces/renderkit/html/ext/HtmlCheckboxRenderer.java      2007-03-23 10:05:42.000000000 +0100
> +++ tomahawk_patched/org/apache/myfaces/renderkit/html/ext/HtmlCheckboxRenderer.java    2008-01-31 16:21:28.000000000 +0100
> @@ -406,7 +406,7 @@
>                         itemStrValue,
>                         selectItem.getLabel(),
>                         isDisabled(facesContext,uiSelectMany),
> -                       lookupSet.contains(itemStrValue), true);
> +                       lookupSet.contains(itemStrValue), false);
>      }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.