解决方案 »

  1.   

    你引用了同一个store对象的问题,对一个检索后其他引用同一个store对象的combo也会显示过滤后的数据你可以给combox增加focus事件clear掉过滤条件
    //通用 国家(地区)代码
    Ext.define("Ext.common.crehqcode", {
        alias: 'widget.mycombo',
        extend: 'Ext.form.field.ComboBox',
        store: new Ext.store.Common.FogurecodeStore(),
        labelAlign: 'right',
        selectOnFocus: true, // 字段获取焦点时自动选择字段既有文本
        triggerAction: 'all', // 触发器被激活时执行的动作,使用'all'来运行由allQuery属性指定的查询
        loadingText: '加载中……',
        queryMode: 'local',
        //typeAhead: true,
        value: 'CHN',
        displayField: 'fogurecodeName',
        valueField: 'fogurecodeId', 
    ////////////////////////////////////////获取交掉后清空过滤条件
        listeners:{focus:function(cb){cb.getStore().clearFilter()}},
    ////////////////////////////////////////
        initComponent: function () {
            var me = this;
     
            me.id = me._id;
            me.name = me._name;
     
            if (!Ext.isEmpty(me._hidden)) {
                me.hidden = me._hidden;
            } else {
                me.hidden = false;
            }
            if (me._allowBlank) {
                me.fieldLabel = me._label;
                me.allowBlank = me._allowBlank;
            } else {
                me.allowBlank = false;
                me.fieldLabel = '<font color="red">*</font>' + me._label;
                me.blankText = me._label + '不能为空!';
            }
     
            me.callParent(arguments);
        }
    });
      

  2.   

    是的,你的store用的是同一个,第一个下拉框检索选择后又没有重载store当然还是显示之前检索的内容了;你可以加监听选中下拉框的项后reload下store
      

  3.   


    谢谢版主!!!这个问题已经解决了,不过还有个关于combo的,我用combo做查询条件,我第一次选择数据查完后,把数据删掉了,然后在查询的时候之前选的数据竟然还在....这是什么原因呢?
      

  4.   

    store.commitChanges()删除完后提交更改