Threaded View
-
9 Jul 2012 5:59 PM #1
The idProperty property invalid of reader.
The idProperty property invalid of reader.
Ext version tested:
Ext 4.1.1(GA)
Browser versions tested against:
Chromium 18.0.1025.168 (Ubuntu 12.04)
Description:
The idProperty property invalid of reader.
var ctlStore=Ext.create('App.store.ContactsList',{autoLoad: true, autoSync: false});Code:Ext.define('App.store.ContactsList', { extend: 'Ext.data.Store', fields: [ { name: 'userid', type: 'int' }, { name: 'ownerid', type: 'int'}, { name: 'rname', type: 'string'}, { name: 'call', type: 'string' }, { name: 'email', type: 'string' }, { name: 'online', type: 'int'}, { name: 'sex', type: 'boolean' }, { name: 'usertype', type: 'string'} ], proxy: { type: 'rest', appendId: false, url: '/openService.ashx/contactlist', headers: { 'Accept': 'application/json' }, writer: { type: 'json', allowSingle: true ,writeAllFields: true }, reader: { type: 'json', root: 'data', idProperty: 'userid' }, listeners: { exception: proxyFailure } } });
Log(ctlStore.getCount()); // log: 3
ctlStore.each(function (record) {
Log(record.getId()); //No log
});
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote