I have a a direct store setup:
Code:
Ihc.app.DirectProxy = new Ext.data.HttpProxy({
api:{
read:Ihc.app.DirectRequestURL+'/readOrderItems',
create:Ihc.app.DirectRequestURL+'/newOrderItem',
update:Ihc.app.DirectRequestURL+'/updateOrderItem',
destroy:Ihc.app.DirectRequestURL+'/deleteOrderItem'
}
});
Ihc.app.DirectWriter = new Ext.data.JsonWriter({
encode:true,
writeAllFields:true,
listful:true
});
Ihc.app.reader = new Ext.data.JsonReader({
totalProperty: 'total',
successProperty: 'success',
idProperty: 'orderItemID',
root: 'data',
messageProperty: 'message'
}, [
{name: 'orderItemID'},
{name: 'item'},
{name: 'itemID'},
{name: 'size'},
{name: 'quantity'},
{name: 'categoryID'},
{name: 'comment'},
{name:'orderID'},
{name:'unlistedItem'}
]);
Ihc.app.dsOrder = new Ext.data.Store({
proxy:Ihc.app.DirectProxy,
writer:Ihc.app.DirectWriter,
autoSave:true,
reader:Ihc.app.reader,
baseParams:{orderID:null},
listeners:{
exception : function(){
//Ihc.app.dsOrder.baseParams.orderID = null;
Ihc.app.dsOrder.removeAll(true);
}
}
});
When I call Ihc.app.dsOrder.removeAll(true) my destroy api call is getting fired. Other then taking of autoSave true is there another way around this? I thought the true flag was supposed to suppress the destroy call?