Expand a tree path by sending the internalId as parameter
Please consider the situation:
- I'm using Extjs'
tree.Panelto have some sort of navigation on a page. - I have a list of item开发者_JAVA百科s in another portion of the page, whose list items have a unique id that matches the
internalIdof a node in the tree. - I wish to bind a click for each list item and expand the tree to the node specified by the id on the item.
I intend to use the expandPath(path) method from the tree. My question would be: how can I get the path string with just the internalId? Thank you.
Unfortunately function NodeInterface.getPath was vanished from extjs4. So there is no way to use expandPath(path). But, instead, you can use
tree.store.getNodeById('ext-record-23').bubble(function(node){node.expand()});
加载中,请稍侯......
精彩评论