-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello
Anyone has an exemple of a tree which allow multiple parents ?
Something like that A |\ B D E \ / F
thanks Nicolas
Seems it is not supported currently, I tried the code below then the child is under the second (last) parent.
public TreeModel<DefaultTreeNode<String>> getModel () {
List children = new ArrayList();
children.add(new DefaultTreeNode("child", (List)null));
DefaultTreeNode root = new DefaultTreeNode(null,
new DefaultTreeNode[] {
new DefaultTreeNode("aaa", children),
new DefaultTreeNode("bbb", children)
});
if (_model == null) {
_model = new DefaultTreeModel<String>(root);
}
return _model;
}
A node allows multiple parents is more like a graph rather than a tree, maybe you can post a feature request.
Asked: 2013-03-29 20:47:38 +0800
Seen: 21 times
Last updated: Jun 20 '13
Large Tree with dynamic columns
Tree width lost after changing col width on maximized panel
MVVM tree example to show add/insert/delete/move/drag?
Error writing 'checked' on type org.zkoss.zul.Checkbox [closed]
Problem with changing MVVM tree model
zk framework: how to load zul pages from WEB-INF under directory zul