View Full Version : How to call a custom api action on an xml store with httpproxy and writer?

29 Dec 2010, 4:04 AM

I want to use an HttpProxy in a store to do transactions and call an action with a specific record.
Something like this:

var store = new Ext.data.XmlStore({
proxy: {api: { cancelEdit: {url: '/proxy?action=cancelEdit', method: "POST"}}

Now i would like to call the cancelEdit action on a specific record in the store.
How could that be done, i.e.:

store.doTransaction('cancelEdit', record, false)

Help appreciated, Ronald

29 Dec 2010, 4:27 AM
Almost correct. The only thing you are missing is that you have to register the cancelEdit action before you create a proxy, e.g.

Ext.data.Api.actions.cancelEdit = 'cancelEdit';