View Full Version : Store does not get new ID after create

Jan Sepke
13 Feb 2014, 6:59 AM
I have a editable grid with store + model + REST-Proxy.
Get, update and delete is no problem, but if I do:

cellEditing.startEditByPosition({ row: 0, column: 1 });

the server respond with:

where "TerritoryUserPK" is the idProperty of the model.
I would now expect that the store will use this id for the new object, but it remains "ext-record-1".
How must the server response look like, so the Ext Store excepts the new ID?
The reader is this:

reader: {
type: 'json',
root: 'data',
messageProperty: 'message',
totalProperty: 'results'

20 Feb 2014, 8:02 AM
It's working for me:


Jan Sepke
3 Mar 2014, 10:53 AM
I found my mistake, the root property was overidden by the first GET requests to get the full list. But the response of a POST has no metadata and another root field.

I totally forgot about the metadata. Will see that we use metadata everywhere or only one root property...