点击组合框时出现加载,如何避免?

时间:2012-10-17 07:16:56

标签: extjs

我有2个组合框,当我点击第二个组合框时,加载出现并保持在那里直到我点击列表项。我不希望加载出现在第二个组合。

我有2个组合框,当我点击第二个组合框时,加载出现并保持在那里直到我点击列表项。我不希望加载出现在第二个组合。

var UnitPanel = Ext.create('Ext.panel.Panel', {
                itemId:'dsUnitPanel',
                border:0,
                items:[UnitGrid,{
                xtype:'combobox',
                tpl: '<tpl for="."><div class="x-boundlist-item" >{name} [{freeSize} GB Free] </div></tpl>',
                style:'margin:10px;',
                fieldLabel: 'A Group(*)',
                editable:false,
                bodyStyle:'padding-left:10px;',
                store: dsAStore,
                valueField:'name',
                displayField:'name',
                //forceSelection: true,
                multiSelect: false,
                name: 'txtMode',
                id:'dsVolumeGroupId',
                queryMode: 'local',
                triggerAction: 'all',
                emptyText:'Select A Group', 
                listeners: {                
                    select: function(combo, record, index) {    

                     this.getStore().each(function(r){                  

                         if(combo.getValue() == r.data['name'])
                         {
                            selectedDsVg = combo.getValue();
                            selectedDsVgFreeSize = r.data['freeSize'];                                              
                         }
                     });

                  } ,

                  'focus':function()
                  { 

                     if(selectedDsWizardIndex == null)
                     {
                         Ext.MessageBox.alert('Error', 'Please select at least one Array',function(){
                                enableTabIndexing();
                             });    

                     }
                  }

                }
            },
            {
                xtype:'combobox',
                style:'margin:10px;',
                fieldLabel: 'B Group(*)',
                editable:false,
                bodyStyle:'padding-left:10px;',
                loadMask: false,
                store: BGroupStore,
                valueField:'value',
                displayField:'name',
                multiSelect: false,
                name: 'dsBGroupId',
                id:'dsBGroupId',
                queryMode: 'local',
                triggerAction: 'all',
                //disabled:true,
                emptyText:'Select B Group', 
                listeners: {                
                    select: function(combo, record, index) {    

                        //store.on('load', function () { this.getPicker().setLoading(false); }, this);
                        this.getStore().loadMask.hide();
                     this.getStore().each(function(r){                  

                         if(combo.getValue() == r.data['value'])
                         {
                             alert('Select');
                            bGroupName = r.data['name'];                                                    
                         }
                     });

                  },

                  'focus':function()
                  {           
                     if(selectedDsWizardIndex == null)
                     {
                         Ext.MessageBox.alert('Error', 'Please select at least one',function(){
                                enableTabIndexing();
                             });    

                     }
                  }


                }
            }

请建议。

1 个答案:

答案 0 :(得分:2)

您应该定义listConfig,如:

listConfig: { loadingText: null, loadMask: false }