ExtJS: Ext.data.DataReader: #realize was called with invalid remote-data

Posted by TomH on Stack Overflow See other posts from Stack Overflow or by TomH
Published on 2010-04-01T21:55:29Z Indexed on 2010/04/02 0:03 UTC
Read the original article Hit count: 765

Filed under:

I'm receiving a "Ext.data.DataReader: #realize was called with invalid remote-data" error when I create a new record via a POST request. Although similar to the discussion at this SO conversation, my situation is slightly different:

My server returns the pk of the new record and additional information that is to be associated with the new record in the grid. My server returns the following:

{'success':true,'message':'Created Quote','data': [{'id':'610'}, {'quoteNumber':'1'}]}

Where id is the PK for the record in the mysql database. quoteNumber is a db generated value that needs to be added to the created record.

Other relevant bits:

var quoteRecord = Ext.data.Record.create([{name:'id', type:'int'},{name:'quoteNumber', type:'int'},{name:'slideID'}, {name:'speaker'},{name:'quote'}, {name:'metadataID'}, {name:'priorityID'}]);

var quoteWriter = new Ext.data.JsonWriter({ writeAllFields:false, encode:true });

var quoteReader = new Ext.data.JsonReader({id:'id', root:'data',totalProperty: 'totalitems', successProperty: 'success',messageProperty: 'message',idProperty:'id'}, quoteRecord);

I'm stumped. Anyone??

thanks

tom

© Stack Overflow or respective owner

Related posts about extjs