Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
项目不显示在下拉列表extJS中_Extjs - Fatal编程技术网

项目不显示在下拉列表extJS中

项目不显示在下拉列表extJS中,extjs,Extjs,我的页面中有一个组合框?看起来像这样 商店 组合配置 var selectStyleComboboxConfig = { fieldLabel: 'My Dropdown', name: 'type', allowBlank: false, editable: false, // This is the option required for "select"-style behaviour triggerAction: 'all', ty

我的页面中有一个组合框?看起来像这样 商店

组合配置

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)]

问题是它不会在下拉列表中显示要选择的项目。我们在项目中使用Ext2.3.0,当我单击选择时,我看到一个很长的下拉列表,但它是空的。我是extJS新手,我迫切需要帮助来度过这个难关。对不起,我的英语,如果需要更多的信息或细节,请告诉我

谢谢,答案很简单。我刚才补充说

valueField: 'id',
displayField: 'name'
现在好了

valueField: 'id',
displayField: 'name'