How can I access the function getTree in my TreeStore-Instance from the configuration of the DirectProxy? Like this etc. nothing works....
Is somebody able to help me?
Ext.define('PM.store.Projects', {
extend: 'Ext.data.TreeStore',
model: 'PM.model.Project',
autoLoad: true,
/*proxy: {
type: 'ajax',
url: 'data/projectTree.json',
reader: {
type: 'json',
},
},
root: {
name: 'Test',
id: -1,
}*/
proxy: {
type: 'direct',
directFn: PM.controller.Projects.getTree,
},
/*root: {
name: 'Demo',
children: [
{
name: 'Test',
leaf: true,
},
],
},*/
getTree: function() {
alert("Test");
}
});