ExtJS组合框无法渲染

问题描述 投票:1回答:1

我有一个用于网格列的组合框编辑器。它也是可编辑的。组合框的商店有autoLoad配置,设置为false意味着当用户点击组合框时,商店被加载。如果我没有在组合框中键入任何内容并单击它,它工作正常。但是,如果我首先在组合框中键入内容,然后单击外部,然后再次单击组合框以加载下拉列表,它根本不会渲染。它只显示加载,然后不显示下拉列表。

这是一个非常奇怪的问题,因为我对其他列也有类似的组合框,但它们工作正常,但它们不可编辑。

这与可编辑配置有什么关系吗?

    var contextDropDownStoreforFactGrid = Ext.create('Ext.data.Store', {
    fields: [{name:'context',type:'string'}],
     proxy: {
         type: 'ajax',
         url: context + '/FcmServlet',
         extraParams: {
             'action': 'getContextDropDownValues'
         },
         reader: {
             type: 'json'
         }
     },
     autoLoad: false    /* load the store only when combo box is selected */
});

    editor: {
                xtype: 'combo',
                store: contextDropDownStoreforFactGrid,
                qureyMode: 'remote',
                id: 'fact_contextId',
                displayField:'context',
                valueField: 'context',
                vtype: 'alphanum',
                listeners: {
                    beforeQuery: function(query) {
                        if (contextDropDownStoreforFactGrid.getCount() != 0) {
                            contextDropDownStoreforFactGrid.removeAll();
                            contextDropDownStoreforFactGrid.load();
                        }

                    }
                }
            },
                renderer: function(value) {
                var index = contextDropDownStoreforFactGrid.find('context', value);
                if (index != -1) {
                    return contextDropDownStoreforFactGrid.getAt(index).data.context;             
                }
                return value;
            }
extjs combobox render extjs4.2
1个回答
0
投票

您的组合框配置中有拼写错误:

qureyMode:'remote',

应该

queryMode:'remote',

这可能导致组合框不从您的商店加载数据。

© www.soinside.com 2019 - 2024. All rights reserved.