setValue : function(v) {
var index=0;
var len=v.split(this.separator).length;
if(len==1 && !this.displayValue){
var snapshot = this.store.snapshot || this.store.data;
snapshot.each(function(r) {
if(r.get(this.valueField)==v){
index=1;
return false;
}
},this);
}
if(index!=1){
this.value = v;
this.setRawValue(v);
}
},
onSelect : function(record, index) {
if (this.check) {
if (this.fireEvent('beforeselect', this, record, index) !== false) {
record.set(this.checkField, !record.get(this.checkField));
if (record.data['text'] == this.selectAllTxt) {
if (record.get(this.checkField)) {// 全选
this.hasSelectAll = true;
this.selectAll();
} else {// 全取消
this.hasSelectAll = false;
this.deselectAll();
}
} else {
if (this.displayValue) {
this.setValue(this.getCheckValue());
} else {
var rst = this.getCheckDisplay();
this.setValue(rst)
}
this.checkSelectAll();
}
this.fireEvent('select', this, record, index);
}
} else {
this.hiddenValue = record.data['value'];// 非复选模式下存放隐藏的值
this.valueField = undefined;// 如果要求在不显示复选框时也在文本框中显示VALUE的值,则去掉这行
Dma.common.DmaCommon.superclass.onSelect.call(this, record, index);
}
//Ext.Msg.alert("", this.hasSelectAll);
},
/* beforeBlur : function() {
if (this.displayValue) {
this.setValue(this.getCheckValue());
} else {
var rst = this.getCheckDisplay();
this.setValue(rst)
}
},
onRealBlur:function(){
if (this.displayValue) {
this.setValue(this.getCheckValue());
} else {
var rst = this.getCheckDisplay();
this.setValue(rst)
}
},*/
selectAll : function() {
this.store.each(function(record) {
// toggle checked field
record.set(this.checkField, true);
}, this);
if (this.displayValue) {
this.setValue(this.getCheckValue());
} else {
this.setValue(this.getCheckDisplay())
}
},
deselectAll : function() {
this.clearValue();
},
clearValue : function() {
this.value = '';
this.hiddenValue = "";
this.setRawValue(this.value);
this.store.clearFilter();
this.store.each(function(r) {
r.set(this.checkField, false);
}, this);
if (this.hiddenField) {
this.hiddenField.value = '';
}
this.applyEmptyText();
},
分享到:
相关推荐
ext,ext combobox,ext二级联动,ext combobox二级联动 ___本人的原则:上传好东西,但绝不便宜.因为自己的心血 ext combobox二级联动,ext ,ext combobox,combobox,combobox二级联动,ext 二级联动 groupCombo.on('...
NULL 博文链接:https://dengli19881102.iteye.com/blog/1046190
NULL 博文链接:https://tianhengbao.iteye.com/blog/816208
全部代码 注意路径 博文链接:https://avs110.iteye.com/blog/1156428
NULL 博文链接:https://zhcl321.iteye.com/blog/1317526
NULL 博文链接:https://yangming103.iteye.com/blog/967492
该资源是war包,里面包括ComboBox中的各个参数, 详细讲解在我的文档中有
前台: 代码如下: var provinceStore = new Ext.data.Store({ proxy: new Ext.data.HttpProxy({ url: basePath + “/stationManage/station... //选择省市 var provinceIDadd = new Ext.form.ComboBox({ anchor : ‘98%
NULL 博文链接:https://dengli19881102.iteye.com/blog/904770
用Ext 2.0 combobox 做的省份和城市联动选择框的例程
用EXT来实现下拉框ComboBox 下拉框可以实现分页
ext关于form表单和combobox的例子
基于Ext3.4的一个扩展Combobox组件
Ext中的Combobox下来框在EditGrid中的应用。Combobox显示值问题得以解决。
用Ext 2_0 combobox 做的省份和城市联动选择框 DOJO中国