1
我還有另一個問題與extjs。當我構建treeview時,我無法獲得與樹節點一起工作的範圍。根節點的範圍是我的js對象,而不是作爲範圍返回窗口的treenode。Extjs treePanel節點範圍問題
任何想法爲什麼?
TreePanel中定義:
this.treeForParamPanel= new Ext.tree.TreePanel(
{
layout: 'fit',
frame:true,
iconCls:'search',
animCollapse:false,
collapsedIconCls: 'search',
titleCollapse :true,
collapsible: true,
split:true,
collapsed: false,
animate: false,
lines: true,
id:'treeParamPanel'+this.id,
region:region,
title: 'aaa',
anchor:'100%',
//rootVisible:false,
width: 200,
height:300,
border:false,
autoScroll:true,
loader: new Ext.tree.TreeLoader({
scope:this,
dataUrl:'index.php?act=index.php'
})
});
this.rootTreeForParamPanel = new Ext.tree.AsyncTreeNode({
text: 'aaa',
draggable:false,
id:'source',
scope:this,
listeners: {
click: {
scope:this,
fn:function(ev) {
alert(this);
}
}
}
});
this.treeForParamPanel.setRootNode(this.rootTreeForParamPanel);
項目定義:
[
{
"text": "testyybvnvbnvb",
"id": "16",
"leaf": true,
"draggable": "false",
"qtip": "aaa",
listeners: {
click: {
scope: this,
fn:function(ev) {
alert(this);
}
}
}
}
]
感謝您的回答。 – 2011-05-31 14:06:46