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


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.

Reply via email to