ImShogun
24 Sep 2009, 4:56 AM
Hello,
I'm trying to use an Ext.Tree.TreeLoader to get the nodes for my tree, but it ain't working (I click, the loading icon show, then that's all.)
My code:
//CANVAS GENERAL
viewport = new Ext.Viewport({
xtype:'container',
layout:'border',
toolbar:Toolbar,
items:[
{
xtype:'treepanel',
//dataUrl:'extcfm/extjsmaker.cfc?method=getTreeNodes',
collapsible:true,
region:'west',
title:'ExtJS "dom" structure explorer',
width:250,
root: {
id: 'root',
text: 'HTML Template Body'
},
loader: new Ext.tree.TreeLoader({
directFn: Ext.ss.extjsmaker.getTreeNodes
})
},
{
title:'About this Editor',
width:150,
collapsible:true,
region:'east',
padding:'5 5 5 5',
html:'ExtJS code being structured like a tree, let\'s just use <u>this</u> ExtJS+cfc+oracle little application to generate the ExtJS code itself...'
},
{
xtype:'panel',
region:'center',
title:'parameters'
}
]
});
});
When I adress my component trough dataUrl, this is the response I get:
[{"id":1.0,"text":"A leaf node","leaf":true},{"id":2.0,"text":"Another leaf node","leaf":true}]...and it works perfectly, but when I query the very same component to my Direct implementation, nothing is happening, even if the result seems ok:
[{"method":"getTreeNodes","tid":2.0,"action":"extjsmaker","type":"rpc","result":[{"id":1.0,"text":"A leaf node","leaf":true},{"id":2.0,"text":"Another leaf node","leaf":true}]}]
I don't understand. Do you?
Thank you for your help!
Laurent
I'm trying to use an Ext.Tree.TreeLoader to get the nodes for my tree, but it ain't working (I click, the loading icon show, then that's all.)
My code:
//CANVAS GENERAL
viewport = new Ext.Viewport({
xtype:'container',
layout:'border',
toolbar:Toolbar,
items:[
{
xtype:'treepanel',
//dataUrl:'extcfm/extjsmaker.cfc?method=getTreeNodes',
collapsible:true,
region:'west',
title:'ExtJS "dom" structure explorer',
width:250,
root: {
id: 'root',
text: 'HTML Template Body'
},
loader: new Ext.tree.TreeLoader({
directFn: Ext.ss.extjsmaker.getTreeNodes
})
},
{
title:'About this Editor',
width:150,
collapsible:true,
region:'east',
padding:'5 5 5 5',
html:'ExtJS code being structured like a tree, let\'s just use <u>this</u> ExtJS+cfc+oracle little application to generate the ExtJS code itself...'
},
{
xtype:'panel',
region:'center',
title:'parameters'
}
]
});
});
When I adress my component trough dataUrl, this is the response I get:
[{"id":1.0,"text":"A leaf node","leaf":true},{"id":2.0,"text":"Another leaf node","leaf":true}]...and it works perfectly, but when I query the very same component to my Direct implementation, nothing is happening, even if the result seems ok:
[{"method":"getTreeNodes","tid":2.0,"action":"extjsmaker","type":"rpc","result":[{"id":1.0,"text":"A leaf node","leaf":true},{"id":2.0,"text":"Another leaf node","leaf":true}]}]
I don't understand. Do you?
Thank you for your help!
Laurent