View Full Version : [FIXED] Does a Ext.data.reader.Json use an idProperty? If not, bug in docs

Scott Murawski
28 May 2014, 7:03 PM
If you check out the JsonStore docs: http://docs.sencha.com/ext/5.0.0/apidocs/#!/api/Ext.data.JsonStore
There is this example below which suggests a json reader can use an 'idProperty' config option. I know Model's use that, but I can't find anything about a reader using it. Does anything other than a Model use the idProperty?

Also I noticed the 'root' config option for the reader is used but the docs for the reader say to use 'rootProperty', which I assume is the recommended config property to use?

var store = new Ext.data.JsonStore({
// store configs
storeId: 'myStore',

proxy: {
type: 'ajax',
url: 'get-images.php',
reader: {
type: 'json',
root: 'images',
idProperty: 'name' <---------

//alternatively, a Ext.data.Model name can be given (see Ext.data.Store for an example)
fields: ['name', 'url', {name:'size', type: 'float'}, {name:'lastmod', type:'date'}]


28 May 2014, 9:12 PM
Correct, there's no idProperty for the reader, it's a doc bug.