I have Ext.tree.Panel and I use Ext.data.TreeStore for my tree.
var storeTree = Ext.create('Ext.data.TreeStore', {
expanded: false,
proxy: {
type: 'ajax',
url: '/tree'
},
root: {
text: 'Ext JS',
id: 'src',
expanded: true
},
folderSort: true,
sorters: [{
property: 'text',
direction: 'ASC'
}]
});
Everything works!
But I need now something like that: at the first time, when I open page, when my tree will be loaded, I need to get JSON Tree from the another location (For example , first time I want to get JSON from /tree1 and then , when I expand my tree, to get from /generalTree);
In the other words, At the first time, I want to load tree from anotther JSON. I don't know now. Or may I send parameter , to the server, which will tell it, that it is first time of using tree (Hey, server, tree is expanded automatically by me, not from user clicking)