带复选框且支持搜索功能的下拉列表8


getValue : function()
{
if (this.valueField)
{
return typeof this.value != 'undefined' ? this.value : '';
}
else
{
return Ext.form.ComboBox.superclass.getValue.call(this);
}
},

/**
* Clears any text/value currently set in the field
*/
clearValue : function()
{
if (this.hiddenField)
{
this.hiddenField.value = '';
}
this.setRawValue('');
this.lastSelectionText = '';
this.applyEmptyText();
},
setValue : function(v)
{
var text = v;
if (this.valueField)
{
var r = this.findRecord(this.valueField, v);
if (r)
{
text = r.data[this.displayField];
} else if (this.valueNotFoundText !== undefined)
{
text = this.valueNotFoundText;
}
}
this.lastSelectionText = text;
Ext.form.ComboBox.superclass.setValue.call(this, text);
this.value = v;
},
/*-----zKF36477 处理下拉多选框赋值操作,批量选中编写的扩展方法 start-----*/
setValues_array : function(v)
{
var text = "";
this.initList();
var vv = null != v ? v.split(",") : "";
for (var i = 0; i < vv.length; i++)
{
if (this.valueField)
{
var r = this.findRecord(this.valueField, vv[i]);
if (r)
{
var check = document.getElementById("checkBox_" + r.data[this.displayField]);

if (null != check && check != undefined && check != "")
{
if (text == "")
{
text += r.data[this.displayField];
}
else
{
text += "," + r.data[this.displayField];
}

if (check.className == "checked")
{
check.className = "checked"
}
else
{
check.className = "checked"
}
}
} else if (this.valueNotFoundText !== undefined)
{
if (text == "")
{
text += this.valueNotFoundText;
}
else
{
text += "," + this.valueNotFoundText;
}
}
}
}
this.lastSelectionText = text;
Ext.form.ComboBox.superclass.setValue.call(this, text);
this.value = text;
},
/*-----zKF36477 处理下拉多选框赋值操作,批量选中编写的扩展方法 end-----*/"]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值