【发布时间】:2017-06-06 06:23:08
【问题描述】:
我的页面中有一个组合框?看起来像这样 一家商店
var sourcesStore = new Ext.data.Store({
autoLoad:true,
storeId: 'sourcesStore',
listeners:Ext.ux.loaderListener,
proxy:new Ext.data.HttpProxy({
url:'/traffic/traffic_source_list/1',
}),
reader:new Ext.data.JsonReader(
{
root:'items',
id:'source_',
messageProperty:'msg',
successProperty:'success',
fields: ['id', 'name']
},
['id', 'name']
)
});
组合配置
var selectStyleComboboxConfig = {
fieldLabel: 'My Dropdown',
name: 'type',
allowBlank: false,
editable: false,
// This is the option required for "select"-style behaviour
triggerAction: 'all',
typeAhead: false,
mode: 'local',
width: 120,
listWidth: 140,
hiddenName: 'traffic_source',
/*store: [
['val1', 'First Value'],
['val2', 'Second Value']
],*/
store: sourcesStore,
readOnly: true
};
在这里设置一个项目
items: [
fileField,
new Ext.form.DateField({
xtype: 'datefield',
fieldLabel: 'Start date',
name: 'startdate',
format: 'd-m-Y'
}),
new Ext.form.DateField({
xtype: 'datefield',
fieldLabel: 'End date',
name: 'enddate',
format: 'd-m-Y'
}),
new Ext.form.ComboBox(selectStyleComboboxConfig)]
问题是它没有在下拉列表中显示要选择的项目。我们在项目中使用 ext 2.3.0 当我单击选择时,我看到一个很长的下拉菜单,但它是空的。我是 extJS 的新手,我迫切需要帮助来解决这个问题。抱歉我的英语不好,如果需要更多信息或细节,请告诉我!
【问题讨论】:
标签: extjs