-
Bug
-
Resolution: Fixed
-
Normal
-
8.0.0
-
None
-
Security Level: Jimmy
-
None
-
ZK 8.0.1 S2
Steps to reproduce
- load the zul
<zk> <tree id="tree" rows="5" multiple="true" checkmark="true"> <treecols> <treecol> <checkbox label="Name" style="font-weight: bold;" id="selectAllCheckbox" onCheck="if(self.checked) tree.selectAll(); else tree.clearSelection();" /> </treecol> <treecol label="Description"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="Item 1"/> <treecell label="Item 1 description"/> </treerow> </treeitem> <treeitem checkable="false" open="false"> <treerow> <treecell label="Item 2"/> <treecell label="Item 2 description"/> </treerow> <treechildren> <treeitem> <treerow> <treecell label="Item 2.1"/> </treerow> <treechildren> <treeitem> <treerow> <treecell label="Item 2.1.1"/> </treerow> </treeitem> <treeitem> <treerow> <treecell label="Item 2.1.2"/> </treerow> </treeitem> </treechildren> </treeitem> <treeitem> <treerow> <treecell label="Item 2.2"/> <treecell label="Item 2.2 is something who cares"/> </treerow> </treeitem> </treechildren> </treeitem> </treechildren> </tree> </zk>
http://zkfiddle.org/sample/3m5r5vt/2-Tree-selectAll-not-working
Workaround
for (Treeitem item: tree.getItems()){ if (item.isCheckable()){ tree.toggleItemSelection(item); } }