PDA

View Full Version : problem with AsyncTreeNode



phamthai
28 Apr 2010, 11:32 PM
I have this code

root: new Ext.tree.AsyncTreeNode({
text: '<?=$GLOBALS['tree_root']?>',
draggable:false,
expanded: true,
id:'ext_root',
listeners: {
'contextmenu': { fn: dirContext },
'load': { fn: expandTreeToDir }
}
})

I want to create a variable :

treeroot = Ext.getCmp("ext_root");

but when using the reference was not : "treeroot is undefined".

evant
28 Apr 2010, 11:36 PM
http://www.extjs.com/deploy/dev/docs/?class=Ext.tree.TreePanel&member=getRootNode