Extjs4中combobox控件-数据加载出来,但一直在loading.

Extjs4中combobox控件---数据加载出来,但一直在loading....

      今天在做combo级联的时候碰到这个问题,很令人头疼,反复检查代码,并没发现有什么问题;而且更令人诧异的是,在我同事的机器上运行却是好好地,而且他用的ie版本跟我的版本一样,那这是什么问题呢?不得而解、、、、、、、

      但问题总是得去解决的,但是怎么解决呢?

      首先,我知道我要解决的问题是将LoadMask这个东东去掉就行了。于是去查API,看combo里面有没有关于loadMask这个属性或者方法,很遗憾没有。

      但是怎么可能呢,于是一个属性一个属性去看,看到defaultListConfig这个属性,英文解释是:Set of options that will be used as defaults for the user-configured listConfig object.大概意思是说:一组选项将会被用作用户配置的listConfig对象的默认值。

      点击listConfig进入该属性API,An optional set of configuration properties that will be passed to the Ext.view.BoundList's constructor. 大概是说:一组可选的属性配置将会传递到Ext.view.BoundList的

构造函数中去。在下面我看到这样一段代码Ext.view.BoundList.loadingText - defaults to 'Loading...',

这不正是加载文本吗?

   为了获得更多的信息我进入Ext.view.BoundList里查看,An internal used DataView for ComboBox.

大概是说:BoundList是combo的一个内部使用的数据视图。查看它的属性列表,哈哈,找到了loadMask,这不正是

我所要的东西吗

loadMask : Boolean/Object

False to disable a load mask from displaying will the view is loading.

This can also be a Ext.LoadMaskconfiguration object. Defaults to true.

    在我的combo控件里面加上如下一段代码:

       defaultListConfig:{
             loadMask: false
       }

问题解决了,LoadMask没了。