I'm trying to write ExtJS app, which is grid, that loads data from JSON file on server, and sends modified fields back to server. Problem is, I can't manage to actually send changed or added data back to server script. Here's the code:
var store = Ext.create('Ext.data.Store', {
model: 'ObjectDefinitionModel',
autoDestroy: true,
autoLoad: true,
proxy: {
type: 'ajax',
url: 'load-object-definition',
api: {
read: 'load-object-definition',
create: 'save-object-definition',
update: 'update-object-definition',
destroy: 'delete-object-definition'
},
reader: {
type: 'json',
root: 'fields'
},
writer: {
type: 'json',
root: 'fields'
}
}
});
And I have the button, which calls store.sync()
when pressed. After syncinc, script in save-object-definition
do execute, but all it receives (in both POST and GET) is [_dc] => 1311511955134
,and I have no idea what it is.
API documentation says that all changed and added data should be packed and sent automatically via proxy. And official examples don't show any data actually being sent, only some debug messages.
Will appreciate any help, thanks in advance.