Expand a tree path by sending the internalId as parameter

ぐ巨炮叔叔 提交于 2020-01-03 02:47:28

问题


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 items 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.


回答1:


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()});


来源:https://stackoverflow.com/questions/6709106/expand-a-tree-path-by-sending-the-internalid-as-parameter

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!