// private
onRender : function(ct, position)
{
Ext.form.ComboBox.superclass.onRender.call(this, ct, position);
var disValue = "";
if (this.hiddenName)
{
this.hiddenField =
this.el.insertSibling({tag:'input', type:'hidden', name: this.hiddenName, id: (this.hiddenId || this
.hiddenName)}, 'before', true);
var hvalue = this.hiddenValue !== undefined ? this.hiddenValue : this.value !== undefined ? this.value : '';
var hvalueArray = hvalue.split(this.valueSeparator);
for (var i = 0; i < this.store.data.length; i++)
{
var r = this.store.getAt(i);
var newValue = r.data[this.displayField];
var v = r.data[this.valueField];
for (var j = 0; j < hvalueArray.length; j++)
{
if (hvalueArray[j] == v)
{
disValue += newValue + this.displaySeparator;
}
}
}
this.hiddenField.value =
this.hiddenValue !== undefined ? this.hiddenValue : this.value !== undefined ? this.value : '';
this.el.dom.removeAttribute('name');
}
if (Ext.isGecko)
{
this.el.dom.setAttribute('autocomplete', 'off');
}
if (!this.lazyInit)
{
this.initList();
}
else
{
this.on('focus', this.initList, this, {single: true});
}
if (!this.editable)
{
this.editable = true;
this.setEditable(false);
}
this.setValue(disValue);
},
带复选框且支持搜索功能的下拉列表2
最新推荐文章于 2025-07-26 13:01:44 发布
5491

被折叠的 条评论
为什么被折叠?



