I have a dijit.Tree
that's populated by a ItemFileReadStore
using JSON. Because of our setup, I need to do a new request each time a tree node is clicked. The tree is using cookies to remember which folders were expanded and not, so that's not a problem. But I'm trying to set focus to the node that was clicked.
I've managed to get the item from the store model by setting its id as a parameter in the url:
store.fetchItemByIdentity({identity:openNode, onItem:focusOpenNode(item)});
function focusOpenNode(item) {
//I've got the item, now how do I get the node so I can do:
var node = getNodeFromItem(item); //not a real method...
treeControl.focusNode(node);
}
but I can't seem to find a way to get the matching node from the item id.