How to reload Ext.tree.TreePanel on demand?
Posted
by Sergei Stolyarov
on Stack Overflow
See other posts from Stack Overflow
or by Sergei Stolyarov
Published on 2009-10-15T09:51:06Z
Indexed on
2010/03/27
20:03 UTC
Read the original article
Hit count: 856
JavaScript
|extjs
I want to create Ext.tree.TreePanel component and periodically load content from the external URl. So I've written something like
new Ext.tree.TreePanel({
root: {
nodeType: 'async',
text: 'asdasd',
draggable: false,
id: 'folders-tree-root'
},
loader: new Ext.tree.TreeLoader()
});
And now I want to reload this tree, so I write:
tree.loader.dataUrl = 'folders-sample.json';
tree.root.reload();
And nothing happens.
add:
The only way I've found is set some invalid value to dataUrl
param on TreeLoader
creation:
new Ext.tree.TreePanel({
root: {
nodeType: 'async',
text: 'asdasd',
draggable: false,
id: 'folders-tree-root'
},
loader: new Ext.tree.TreeLoader(dataUrl: 'something')
});
© Stack Overflow or respective owner