var storeDepart=new Ext.data.JsonStore({ autoLoad : true, url:'deptList.action', root: 'data', fields : ['value','name'] }); var storeRUser=new Ext.data.JsonStore({ url:'personList.action', root: 'data', fields : ['value','name'] }); storeRUser.on('load', function() { var firstValue = storeRUser.getRange()[0].data.value; assessPerson.setValue(firstValue); alert("value="+assessPerson.getValue());//查看选中的value alert("text="+assessPerson.getRawValue());//查看选中的文本 }); var assessPerson = new Ext.form.ComboBox({ name:'assessPerson', fieldLabel: '考核人员', hiddenName: 'assessPerson', xtype: 'combo', // id:'assessPerson', anchor: '40%', forceSelection: true, allowBlank:false, editable: false, blankText:'请选择该项的属性', store:storeRUser, emptyText: '请选择', mode: 'local', selectOnFocus:true, triggerAction: 'all', valueField: 'value', displayField: 'name' // readOnly: false // }); var assessDepart = new Ext.form.ComboBox({ fieldLabel: '考核部门', hiddenName: 'assessDepart', xtype: 'combo', anchor: '40%', forceSelection: true, editable: false, allowBlank:false, blankText:'请选择该项的属性', store:storeDepart, emptyText: '请选择', mode: 'local', selectOnFocus:true, triggerAction: 'all', valueField: 'value', displayField: 'name', readOnly: false, listeners:{ "select":function(assessDepart,record,index){ var codeId = assessDepart.getValue(); // var sd = Ext.get("assessPerson"); // // sd.setValue(''); storeRUser.load({params:{code:codeId}}); } } });