-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
8.0.1.1
-
win7
tomcat8
chrome v52
Attribute checkable="false" is ignored in ZK8
MyModel.java
package tst; import java.util.Arrays; import org.zkoss.zul.DefaultTreeModel; import org.zkoss.zul.DefaultTreeNode; public class MyModel { public DefaultTreeModel<String> getTreeModel() { return new DefaultTreeModel<>(node("root", node("item1", node("item11", node("item111"), node("item112"))), node("item2", node("item21", node("item211")), node("item22", node("item221"))) )); } @SafeVarargs private static DefaultTreeNode<String> node(String name, DefaultTreeNode<String>... children) { return (children.length == 0) ? new DefaultTreeNode<>(name) : new DefaultTreeNode<>(name, Arrays.asList(children)); } }
tst.zul
<zk> <window viewModel="@id('vm') @init('tst.MyModel')"> <tree model="@init(vm.treeModel)" onSelect="alert(event.getSelectedObjects());"> <template name="model"> <treeitem label="${each}" checkable="false" /> </template> </tree> </window> </zk>
Expected behaviour: nodes should not be selectable
Actual behaviour: nodes are selectable