Hello,
I am trying to get store.sync() to work. I have it working great with updating and adding records. I can't get it to tell the server that it is destroying a record.
this is the basic sync code that I am calling.
Code:
Store = Ext.StoreMgr.lookup('locationsStore');
Store.sync({
success: function (batch, opts) {
console.log(batch);
},
failure: function (response, opts) {
}
});
It calls my php file twice, once for modifying the record and once for destroying it (when there is a add and destroy action to be full filled).
As you can see from the console log it does two operations, an update and destroy. How can I get it to tell the PHP application what operation it is performing?
Code:
i {proxy: i, listeners: null, hasListeners: e, events: Object, operations: Array[2]…}- current: 1
- events: Object
- exceptions: Array[0]
- hasException: false
- hasListeners: e
- isComplete: true
- isRunning: false
- listeners: null
- operations: Array[2]
- 0: i
- action: "update"
- batch: i
- complete: true
- records: Array[1]
- request: i
- response: Object
- resultSet: i
- running: false
- started: true
- success: true
- __proto__: a
- 1: i
- action: "destroy"
- batch: i
- complete: true
- records: Array[1]
- request: i
- response: Object
- resultSet: i
- running: false
- started: true
- success: true
- __proto__: a
- length: 2
- __proto__: Array[0]
- proxy: i
- total: 2
- __proto__: a
the Form data it post is identical except for the json data it is passing.
Any help will be appreciated, thanks