extjs 3.4组合框加载问题

extjs 3.4组合框加载问题,extjs,combobox,Extjs,Combobox,我使用的是ExtJS3.4组合框。我正在检查combo存储加载的焦点。combo有值,但它显示在焦点事件中写入的消息。我想在选择combo之前检查combo是否有值,它不显示消息。另一方面,combo返回消息,请至少创建值。 这是我的密码 对不起,我的英语很差 Ext.form.ComboBox({ id:"comboCB", hiddenName:'comboCBId', store: new Ext.data.Store({ proxy: new Ext.data.HttpProxy({ u

我使用的是ExtJS3.4组合框。我正在检查combo存储加载的焦点。combo有值,但它显示在焦点事件中写入的消息。我想在选择combo之前检查combo是否有值,它不显示消息。另一方面,combo返回消息,请至少创建值。 这是我的密码

对不起,我的英语很差

Ext.form.ComboBox({
id:"comboCB",
hiddenName:'comboCBId',
store: new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: '',
timeout :12000,

success: function(response) {
console.log("Spiffing, everything worked");
isloaded = true;
},

failure: function(response) {
console.log("Curses, something terrible happened");
},

callback: function(response) {
console.log("It is what it is");
}
}),
reader: new Ext.data.JsonReader({
id: "id",
root: 'rows',
totalProperty: 'total'
}, Ext.data.Record.create([
{
name: "id",
mapping: "id",
type: "string"
},
{
name: "name",
mapping: "name",
type: "string"
}])),
remoteSort: false,
autoLoad : true,
}),
emptyText:'Select Value ...',
fieldLabel:'Value',
displayField: 'name',
valueField: 'id',
typeAhead: true,
editable: false,
forceSelection: true,
triggerAction: 'all',
mode:'remote',

maxLength: 50,
anchor : '90%',
selectOnFocus:true,
listeners: {
change: function(combo, newValue, oldValue){

},

select: function(combo, record, index){

},
focus: function(combo){
if(combo.getStore().getTotalCount() == 0){
Ext.MessageBox.show({
title: 'Message',
msg: 'Please add one Value',
buttons: Ext.MessageBox.OK,
icon: 'error'
});
return
}
}
}
})

你能澄清你的问题吗…?我想在组合框没有数据时显示消息。但如果组合框有数据,它也会显示消息。