Hi Animal,
actually I have combo stores set to autoLoad: true, as when the form loads a right value has to be selected and initialized.
So on form show event I load form data. But all the dependent stores (those for combos) are loaded on class initialization. So this combo loading takes some time and fields of the form are blank until combos finish loading.
It is also true, that I have this piece of code for combos to display the right values from their stores.
PHP Code:
Ext.override(Ext.form.ComboBox, {
setValue : function(v){
// Store not loaded yet? Set value when it *is* loaded.
if (this.store.getCount() == 0) {
this.store.on('load', this.setValue.createDelegate(this, [v]), null, {single: true});
return;
}
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;
if(this.hiddenField){
this.hiddenField.value = v;
}
Ext.form.ComboBox.superclass.setValue.call(this, text);
this.value = v;
}
});