toedter_k
13 Jan 2010, 2:01 AM
Hi All,
I need a TreePanel with a custom policy for checkable nodes. The use case is that some leafs and some non-leafs should be checkable, depending on a rpoperty of the tree node's underlying model element.
To make special leafs non-checkable I overloaded TreePanel.renderChild() and invoked setCheckable depending on the context. But this does not work for non-leafs.
I also played around with onExpand, onCollapse and the CheckNodes.LEAF/CheckNodes.BOTH flags, but after one day of trying I gave up.
I would appreciate any help how I could create a TreePanel that does the following:
All leafs can be checked
All non-leafs cannot be checked, except:
All nodes with model.id=="location" can be checked, even if they have children
Many thanks
Kai
I need a TreePanel with a custom policy for checkable nodes. The use case is that some leafs and some non-leafs should be checkable, depending on a rpoperty of the tree node's underlying model element.
To make special leafs non-checkable I overloaded TreePanel.renderChild() and invoked setCheckable depending on the context. But this does not work for non-leafs.
I also played around with onExpand, onCollapse and the CheckNodes.LEAF/CheckNodes.BOTH flags, but after one day of trying I gave up.
I would appreciate any help how I could create a TreePanel that does the following:
All leafs can be checked
All non-leafs cannot be checked, except:
All nodes with model.id=="location" can be checked, even if they have children
Many thanks
Kai