鉴于以下的javascript:EXTJS COMBOX - 商店做负载,但并没有显示
var fo = Ext.create('Ext.form.Panel', {
layout:'box',
...
items: [{
xtype: 'combobox',
valueField: 'id',
displayField: 'organizationtype',
store: {
storeId: 'zaza',
fields: [{name: 'id'}, {name: 'organizationtype'}],
root: 'data',
autoLoad: true,
proxy: {
type: 'ajax',
url: '/apps/crm_organizations/orgtype/',
reader: {
type: 'json'
}
}
},
fieldLabel: 'Type relation',
name: 'organizationtype',
queryMode: 'local',
},
...
此面板包含 - 也是这个组合框 - 其他领域。我可以用wireshark看到URL'/ apps/crm_organizations/orgtype /'实际上被查询。但是,组合框不显示任何值。这是否与我懒加载组合框的事实有关?
这是在JSON请求的响应:
{data: [ {id:"1" ,organizationtype:"Customer"}
,{id:"2" ,organizationtype:"Relation"}
,{id:"3" ,organizationtype:"Supplier"}
,{id:"4" ,organizationtype:"Unknown"} ]}
Thanx,解决方案和学习点,切换到模型! – Paul 2012-07-24 12:09:34