Your explanation is very useful. Thanks again Derrell. Here is the code for selecting any nodeId in a treevirtual:
var row = mod.getNodeRowMap()[nodeId] tree.getSelectionModel().setSelectionInterval(row, row); Hope it will be useful to anybody else. Derrell.Lipman wrote: > > You may find low-level access useful. You can obtain the whole array of > nodes > with > > var nodeArr = tree.getDataModel().getData(); > > You can then iterate through the nodes. Note that nodeArr is the COMPLETE > list of nodes, including those not currently visible. The indexes are > therefore different than the selection indexes which include only the > visible > elements. > > Once you have the node array, you can do a recursive descent through the > tree > using a node's 'children' property. It's an array of node array indexes > of > each of that node's children. > > Note that the actual root of the tree, index 0, is a "virtual" node; it is > never displayed, and is there solely to provide a root of all other nodes. > > For details of node properties, see the documentation of > SimpleTreeDataModel. > > After you make changes to nodes in the node array, call > > tree.setData() > > which causes the tree to be rerendered using the current node array. > -- View this message in context: http://www.nabble.com/How-to-select-an-item-in-treevirtual-tf3440169.html#a9916803 Sent from the qooxdoo-devel mailing list archive at Nabble.com. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
