var store= Ext.create('Ext.data.Store', {
fields: ['id', 'name']
proxy: {
type: 'ajax',
url: 'your url',
reader: {type: 'json'}
}
});
{
xtype: 'combo',
store: store,
fieldLabel: '建成年份',
displayField: 'name',
valueField: 'id'
}
//你试试看这样行不行,因为extjs版本的不同,同样的写法可能会不起作用,我这里用的是4.0
json返回格式对吗?需要root吧