afterlayout: function(me){
var type = localStorage.getItem("Usertype");
var id = localStorage.getItem("Id");
var tree = Ext.getCmp('your_treepanel_id')
if(type==desiredUserFilter) {
var child = me.getRootNode().findChild('id',id,true)
tree.selectPath(child)
}
},
1条答案
按热度按时间ipakzgxi1#
在afterlayout事件中,使用treepanel的selectPath方法实现: