欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Ext comboBox的remote模式,联想功能实现

程序员文章站 2022-04-12 12:41:46
...
["", ""] : childStore,
listeners : {
// 验证用户输入的用户群是否正确
blur : function(combo, record, index) {
if(!queryFlag){
Ext.get("msg").dom.innerHTML = '<img src=\"'
+ basePath
+ '/theme/default/images/cue.png"> ' + "<span style='color:red;line-height:24px;' ext:qtip='" + tag_userNotSupportSearch + "'>"
+ ps.string.cutString(tag_userNotSupportSearch, ggsnbarTitleMaxLength,true) + "</span>";
return queryFlag;
}
var comTypeValue=Ext.getCmp("userTypeComBox").value;
var currInputValue = combo.value;

if (combo.value == "") {
currMSISDN = "";
Ext.ps.commonCmp.UserGroup.setTipInfo(comTypeValue);
return;
} else {
currMSISDN = "";
// 判断输入的用户格式是否符合
if (Ext.ps.commonCmp.UserGroup
.checkInput(currInputValue) == false) {
return;
}
/*else {
queryMSISDN(currInputValue);
}*/
}
},
keyup: function(combo, evt) {
firstTime = false;
},
select:function (combo, record, index){
if(!queryFlag){
Ext.get("msg").dom.innerHTML = '<img src=\"'
+ basePath
+ '/theme/default/images/cue.png"> ' + "<span style='color:red;line-height:24px;' ext:qtip='" + tag_userNotSupportSearch + "'>"
+ ps.string.cutString(tag_userNotSupportSearch, ggsnbarTitleMaxLength,true) + "</span>";
}
firstTime = true;
return queryFlag;
},
beforeselect: function (combo, record, index){
if (record.data.value == "<div style=\"background-color:#ffffff;cursor:default;\"\>...</div>") {
// 如果选择 ... 则不更改选当前选择的值
var originValue = combo.value;
combo.setValue(originValue);
combo.collapse();
combo.selectText(originValue.length, originValue.length);
firstTime = true;
return false;
}
return true;
}
}
});
if(userGroupPanel!=null){
userGroupPanel.insert(2,userGroupComBox);
userGroupPanel.doLayout();
}
}
相关标签: combobox ext