我想通过treePanel中的叶子节点打开TabPanel中的Grid,但是后台一直没法得到叶子节点的值
代码如下:
[code="java"]
var ggid;
var store = new Ext.data.Store({
proxy:new Ext.data.HttpProxy({url:'requHandler.htm?m=findRequs&gid='+ggid,method:'GET'}),//这里的ggid在后台一直拿不到 undefined.
reader: new Ext.data.JsonReader({
root: 'objectList',
totalProperty: 'total',
//id: 'threadid',
fields: [
'name', 'coverstatus', 'priority'
]
}),
sortInfo: {
field: 'name',
direction: 'desc'
}
});
var treeTR = new Ext.tree.TreePanel({
title: 'Test',
border: false,
iconCls: 'settings',
layout:"fit",
autoScroll:true,
animate:false,
enableDD:false,
rootVisible:false,
border:false,
listeners: {
'dblclick':function(node,e){
if(node.isLeaf()){
ggid=node.id;//这里我把叶子节点的id存下来了
tabs.add({
title: 'Requirment' ,
iconCls: 'tabs',
autoScroll:true,
closable:true,
items: [gridRequ] //gridRequ是我gridPanel,store:store
}).show();
alert(ggid);//这里也能显示
store.load({params:{start:0,limited:10}});
}
}
}
});
[/code]
我在页面上设置个变量也无法存储 node.id 该如何解决呢