initComponent : function() { Ext.form.ComboBox.superclass.initComponent.call(this); this.addEvents('expand', 'collapse', 'beforeselect', 'select', 'beforequery'); if (this.transform) { this.allowDomMove = false; var s = Ext.getDom(this.transform); if (!this.hiddenName) { this.hiddenName = s.name; } if (!this.store) { this.mode = 'local'; var d = [], opts = s.options; for (var i = 0, len = opts.length; i < len; i++) { var o = opts[i]; var value = (Ext.isIE ? o.getAttributeNode('value').specified : o.hasAttribute('value')) ? o.value : o.text; if (o.selected) { this.value = value; } d.push([value, o.text]); } this.store = new Ext.data.SimpleStore({ 'id': 0, fields: ['value', 'text'], data : d }); this.valueField = 'value'; this.displayField = 'text'; } s.name = Ext.id(); // wipe out the name in case somewhere else they have a reference if (!this.lazyRender) { this.target = true; this.el = Ext.DomHelper.insertBefore(s, this.autoCreate || this.defaultAutoCreate); Ext.removeNode(s); // remove it this.render(this.el.parentNode); } else { Ext.removeNode(s); // remove it }
} this.selectedIndex = -1; if (this.mode == 'local') { if (this.initialConfig.queryDelay === undefined) { this.queryDelay = 10; } if (this.initialConfig.minChars === undefined) { this.minChars = 0; } } },