PDA

View Full Version : Problem treestore auto loading data extjs4.2.1



phuongdt
22 Oct 2013, 12:28 AM
I have defined treestore:
Ext.define('Gtrack.store.SaUserTreeFunctionStore', {
extend: 'Ext.data.TreeStore',
model: 'Gtrack.model.SaUserTreeFunctionModel',
storeId: 'SaUserTreeFunctionStore',
autoLoad: false,
sorters: [{
property: 'FUNCTION_NAME',
direction: 'ASC'
}]
});

and treemodel:
Ext.define('Gtrack.model.SaUserTreeFunctionModel', {
extend: 'Ext.data.Model',
idProperty: 'FUNCTION_ID',
fields: [{
name: 'ID'
}, {
name: 'FUNCTION_NAME'
},
........................
,{
name: 'IsChecked'
},
],
proxy: {
type: 'ajax',
api: {
read: '/SaFunction/GetFunctionTreeList',
create: '/SaFunction/Create',
update: '/SaFunction/Update',
destroy: '/SaFunction/Delete'
}
}
});


I don't want to autoload streestore after render, default automatic
I have been set property autoLoad: false of treestore but fail

Please help me, thank.

scottmartin
24 Oct 2013, 12:39 PM
What is your requirement ... to not load anything?
.. or to only load the root items and then load child items on expand?

Scott.