sencha2.0 接受多层json数据和使用association的model
使用sencha接受多层的json数据是很常见的,比如:
Ext.define('app.model.PropertyList',{ extend: 'Ext.data.Model', requires: [ //'app.model.Property', ], config: { fields: [ {name : 'code', type : 'string'}, {name : 'message',type : 'string'},{name : 'total',type : 'string'}, ], associations: [{ type: 'hasMany', model: 'Property', name:'result', associationKey:'result' }] }});Ext.define('Property',{ extend: 'Ext.data.Model', config: { fields: ['label'], }});