【发布时间】:2017-09-04 22:02:01
【问题描述】:
鉴于以下 javascript:
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"} ]}
【问题讨论】: