View Full Version : Rest service Extjs

29 Jul 2015, 11:26 PM
I am using restful service provided in extjs,When I try to update a row the entire row data will be sent to the server instead of sending the updated column so I have used "writeAllFields : false" which will send only the updated data,but the problem is I need to send 'id' also along with the updated column How can I accomplish this?

Sudesh K

29 Jul 2015, 11:37 PM
Hy what about persist ?

Ext.define('bla.bla.bla', {
extend: 'Ext.data.Model',
fields: [
name: 'id',
type: 'int',
persist: true,

30 Jul 2015, 12:28 AM
Thanks for the reply but the solution doesn't work for me.
My situation is :
I need to send only the updated column to the server
So I have used
writer: {writeAllFields : false }

this will also not send the Id to the server hence I am not able to update the data belonging to particular Id,so my requirement is I need to send Id along with the update columns data to the server

31 Jul 2015, 1:37 PM
Is writeRecordId set to true? Looking at the docs (http://docs.sencha.com/extjs/4.2.1/source/Writer.html#Ext-data-writer-Writer-method-getRecordData), it looks like the ID field should be included in the data. You may need to override the getRecordData() method to include this field as well.