* the store, valueNotFoundText will be displayed as the field text if defined (defaults to undefined)
*/
valueNotFoundText : undefined,
+
+ /**
+ * @cfg {String} defaultValue The value displayed after loading the store.
+ */
+ defaultValue: '',
+
/**
* @cfg {Boolean} blockFocus Prevents all focus calls, so it can work with things like HTML edtor bar
*/
op.innerHTML = String.format('{0}', r.data[df]);
dom.appendChild(op);
});
- Roo.log()
+ if (typeof(this.defaultValue != 'undefined')) {
+ this.setValue(this.defaultValue);
+ }
+
}else{
//this.onEmptyResults();
* @param {String} value The value to match
*/
setValue : function(v){
-
- for (var i =0; i < this.dom.options.length;i++) {
- if (v == this.dom.options[i].value) {
- this.dom.selectedIndex = i;
+ var d = this.el.dom;
+ for (var i =0; i < d.options.length;i++) {
+ if (v == d.options[i].value) {
+ d.selectedIndex = i;
this.value = v;
return;
}
},
getResizeEl : function(){
return this.el;
- },
+ }
});
\ No newline at end of file