Ext combobox级联监听clearValue()出现问题

var categoryStore = new Ext.data.JsonStore({
    id:'categoryStore',
        url:'PCM/getmaindata.action?parentId='+adPublicize_category,
        root:'root',
        fields: ['typecode','typename']
    });

   categoryStore.load();



var ggf_cost_categoryCombo = new Ext.form.ComboBox({
id : 'cost_category',
labelStyle : 'text-align:right',
fieldLabel : '费用类别',
anchor : '100%',
editale : false,
readOnly : true,
emptyText : '--请选择费用类别--',
displayField : 'typename',
valueField:'typecode',
mode : 'local',
triggerAction : 'all',
store : categoryStore,
listeners:{       
          select : function(combo, record,index)  
         {  
        
         Ext.getCmp('cost_project').clearValue();
             //可以实现当队下拉值变更时,清空之前费用项目下拉选项中的值  
              
           projectStore.proxy= new Ext.data.HttpProxy({url: 'PCM/getmaindata.action?parentId=' + combo.value}); //根据队下拉选项的改变,动态取出对应的井  
                 
           projectStore.load(); //加载费用项目store     
          }     
      }
})


var projectStore = new Ext.data.Store({  //费用项目选择下拉框  
     proxy: new Ext.data.HttpProxy({     
         url: 'dsdd' //这里是参数可以随便写,这个数据源是在第一个下拉框select的时候load的  
     }),     
     reader: new Ext.data.JsonReader({     
     root: 'root'  
     }, [     
        {name: 'typename'},     
        {name: 'typecode'}     
     ])     
    } );

   projectStore.load();

var ggf_cost_projectCombo = new Ext.form.ComboBox({
id : 'cost_project',
labelStyle : 'text-align:right',
fieldLabel : '费用项目',
anchor : '100%',
editale : false,
displayField : 'typename',
valueField:'typecode',
mode : 'local',
triggerAction : 'all',
readOnly : true,
emptyText : '--请选择费用项目--',
store : projectStore
})




出现'this.el.dom' 为空或不是对象 问题


 

 

[code="js"]
select: function (combo, record, index) {

        Ext.getCmp('cost_project').clearValue();
        //可以实现当队下拉值变更时,清空之前费用项目下拉选项中的值  
        projectStore.proxy = new Ext.data.HttpProxy({
            url: 'PCM/getmaindata.action?parentId=' + combo.getValue()//!!
        }); //根据队下拉选项的改变,动态取出对应的井  
        projectStore.load(); //加载费用项目store     
    }

[/code]

我不知道你程序发生错误的前提

[code="js"]
var categoryStore = new Ext.data.JsonStore({
id: 'categoryStore',
url: 'PCM/getmaindata.action?parentId=' + adPublicize_category,
root: 'root',
fields: ['typecode', 'typename']
});

categoryStore.load();

var ggf_cost_categoryCombo = new Ext.form.ComboBox({
id: 'cost_category',
labelStyle: 'text-align:right',
fieldLabel: '费用类别',
anchor: '100%',
editale: false,
readOnly: true,
emptyText: '--请选择费用类别--',
displayField: 'typename',
valueField: 'typecode',
mode: 'local',
triggerAction: 'all',
store: categoryStore,
listeners: {
select: function (combo, record, index) {

        Ext.getCmp('cost_project').clearValue();
        //可以实现当队下拉值变更时,清空之前费用项目下拉选项中的值  
        projectStore.proxy = new Ext.data.HttpProxy({
            url: 'PCM/getmaindata.action?parentId=' + combo.value
        }); //根据队下拉选项的改变,动态取出对应的井  
        projectStore.load(); //加载费用项目store     
    }
}

})

var projectStore = new Ext.data.Store({ //费用项目选择下拉框

proxy: new Ext.data.HttpProxy({
url: 'dsdd' //这里是参数可以随便写,这个数据源是在第一个下拉框select的时候load的

}),
reader: new Ext.data.JsonReader({
root: 'root'
},
[{
name: 'typename'
},
{
name: 'typecode'
}])
});

projectStore.load();

var ggf_cost_projectCombo = new Ext.form.ComboBox({
id: 'cost_project',
labelStyle: 'text-align:right',
fieldLabel: '费用项目',
anchor: '100%',
editale: false,
displayField: 'typename',
valueField: 'typecode',
mode: 'local',
triggerAction: 'all',
readOnly: true,
emptyText: '--请选择费用项目--',
store: projectStore
})

出现'this.el.dom'为空或不是对象问题
[/code]