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?

After continuing to play with this particular setup I started finding some other odd things.

1. When I would start a new order, and clear out the items in the store using removeAll, I would some times get an exception when trying to add a new item to the empty store. I would see a destroy call go out(even though I did not call it!!!) with the old record ids that were removed( I could see they were not in data.items) go out in the call.

2. I would also at times see the wrong item values get inserted. I could see the new items info go out in the create call, and see them come back in the response, but then the value would revert to that which was in the store before my removeAll call.

All of these issues really had me thinking I was not going to be able to use the direct writer for this control. Then I got a suggestion from Lloyd in the ext IRC chat to destroy the store, and start over, instead of removing the old records.

This suggestion fixed my problem, and allowed me to utilize the writer, and direct store with my grid. I'm not sure if this is the intent of the store, that it should be destroyed, but it is what I needed to do in my use case.

proxy: {
type: 'ajax',
/**
* This gets called when we call removeChild with destroy set to true, and by default it tries to
* sync with the server, which is not what we want.
* This version simply removes the record from the store and calls the callback.
* @param {[type]} operation The operation being performed.
* @param {Function} callback The callbakc function.
* @param {[type]} scope The scope in which to call the callback
*/
destroy: function(operation, callback, scope) {
if (operation) {
Ext.Array.each(operation.records, function(record) {
if (record) {
Ext.Array.each(record.stores, function(store) {
store.remove(record);
});
}
});
}
Ext.callback(callback, scope, [operation]);
}
}

Can't help but think buildRequest should not throw an exception if you have no url for destroy though... feel like I'm being forced to dodge something that I should be able to tell the framework I do not support.