// 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
热度:112 发布时间:2012-10-15 09:45:24.0
相关解决方案