PDA

View Full Version : TreeStore.sync() not working.



RashmiBhadsawle
20 Sep 2011, 3:35 AM
Hi,
TreeStore.sync() is not working.
Any suggestions??

TreeStore :



Ext.define('Overdrive.store.TempTree', {
extend: 'Ext.data.TreeStore',


constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
storeId: 'TempTree',
autoLoad:true,
proxy: {
actionMethods: {
create: 'POST',
destroy: 'DELETE',
read: 'GET',
update: 'PUT'
},
type: 'rest', //changed from 'ajax' to 'rest'
url: '/bom_items.json',
reader: {
type: 'json',
idProperty: 'id',
root: 'data'
},
writer: {
type: 'json',
root: 'data',
successProperty: 'success'
}
},
root: {
name: 'Root',
id: 0,
expanded: true
},
fields: [
{
name:'id'
},
{
name:'name'
},
{
name:'qty'
}
]
}, cfg)]);
}
});