通过发送internalId作为参数来展开树状路径 [英] Expand a tree path by sending the internalId as parameter

查看:118
本文介绍了通过发送internalId作为参数来展开树状路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请考虑以下情况:


  1. 我正在使用Extjs的 tree.Panel 在页面上有一些导航。

  2. 我在页面的另一部分中有一个项目列表,其列表项具有唯一的ID它匹配树中节点的 internalId

  3. 我希望绑定每个列表项的点击并将树展开到由项目上的id指定的节点。

  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.

我打算使用 expandPath(path)方法。我的问题是:如何使用 internalId 获取路径谢谢。

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.

推荐答案

不幸的是, NodeInterface.getPath 已消失从extjs4。所以没有办法使用 expandPath(path)。但是,您可以使用

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

这篇关于通过发送internalId作为参数来展开树状路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆