我的视图中有一个普通的 Combobox,我想加载商店,但后来我的 Firebug 中出现错误: TypeError: reader.read is not a function result = reader.read(me.extractResponseData(response));
我认为的部分:
{
xtype: 'combobox',
id:'newsletter_template',
fields: ['groupValue','groupText'],
name:'template',
editable:false,
valueField: 'groupValue',
displayField: 'groupText',
allowBlank: false,
fieldLabel: 'Template',
anchor: '100%',
emptyText: 'Choose Template',
store: Ext.create('Ext.data.ArrayStore', {
model: 'news',
controller: 'news',
proxy: {
type: 'ajax',
url: 'bin/news/ajax.php',
reader: {
type: 'json',
root: 'results'
},
extraParams:{
action:'getNewsTemplates'
}
},
callback: function(records, operation, success) {
// do something after the load finishes
},
autoLoad: false
})
}
有人有想法吗?多谢!!!