开发者

Expand a tree path by sending the internalId as parameter

Please consider the situation:

  1. I'm using Extjs' tree.Panel to have some sort of navigation on a page.
  2. I have a list of item开发者_JAVA百科s in another portion of the page, whose list items have a unique id that matches the internalId of a node in the tree.
  3. 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()});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜