绑定存储中断组合框

bindStore breaks combobox

本文关键字:组合 中断 存储 绑定      更新时间:2023-09-26

在我拥有的其他表单字段中(组合框是标准组合框的扩展,具有额外的配置选项):

   marker: new Forms.ui.ComboBox({
    fieldLabel: _('Marker'),
    displayField: 'name',
    valueField: 'id',
    store: new Ext.data.JsonStore({
      fields: ['name', 'id','resellerid'],
      data: [
        {'name':_('Default'), 'id': 0, 'resellerid': 0}
      ]
    })
   })

现在,当我需要在单独调用的函数中使用bindStore并向其传递jsonStore(存储)时:

this.fields.marker.bindStore(store);

但是,当商店填充时 - 我无法选择任何内容。我将商店移动到相同的脚本来测试它 - 并将其直接设置为组合框配置为"store:" - 它可以工作。

所以问题似乎来自绑定存储。我错过了什么?

显然,是

数据属性名称周围的引号破坏了它。