【发布时间】:2013-11-23 14:27:44
【问题描述】:
我有一个 JsonRestStore + ForestStoreModel 树,它工作正常,但是当我尝试使用 tree.set('paths', ...) 函数直接访问节点时它不起作用。
请参考这个小例子:http://wasmonitor.com/dojotree.html
如果您单击该按钮,它应该展开 Web 服务器并选择 web1,但它没有...这是我的问题。
我的树是无根的,我知道 ForestStoreModel 在未指定时默认 rootId 为 $root$。所以我正在尝试使用以下代码访问节点:
var stree = dijit.byId("statTree");
stree.set("paths", [ "$root$", "WebServers", "web1" ]);
但它永远不会打开。
已经读过这个问题:diji.Tree + JsonRestStore - selecting node programmatically with tree.set("path",这很相似,但对我不起作用...
有什么提示吗?
谢谢!
理查德
【问题讨论】:
标签: tree dojo dijit.tree