Reputation: 7790
I'm using the gwt cellbrowser, so far it has been an uphill battle. I got this bad feeling that I'm not using it as it is intended to be used.
It seems to me that:
I'm able to use the selectionModel to select a node but that doesn't open the node. In other words, the node's children don't show up (until I click on the node).
Is there anyway, I can open and close nodes programatically?
Thanks in advance.
Upvotes: 1
Views: 414
Reputation: 11
I hope this helps. First time helping but long time user. :)
SomeTreeModel treeModel = new SomeTreeModel();
CellBrowser cellBrowser = new CellBrowser(treeModel, null);
// this opens your first node
TreeNode firstNode = cellBrowser.getRootTreeNode().setChildOpen(0, true);
// this opens child of the first node
TreeNode secondNode = firstNode.setChildOpen(0, true);
//etc
In the TreeNode
class there are several helpful methods, like, getChildValue(int index)
, getChildCount()
...
Upvotes: 1