View Full Version : 4.1 B2 - loadRecord combos contain "undefined" prior to load

Tim Toady
21 Feb 2012, 10:47 AM
Would you guys consider it a bug that in 4.1 B2 when loadRecord is done on a form all the combos contain the text "undefined" until the store has finished loading?

21 Feb 2012, 11:24 AM
This has been behavior in every Ext JS version. What you would need to do is have a store load listener which would execute setValue on the combo when the store loads.

Tim Toady
21 Feb 2012, 11:47 AM
It will automatically set the value when the store loads without explicitly creating a listener. My question is regarding the text that is displayed while the ajax call has not yet returned. In 4.07 the combo is blank. In 4.1 B2 the combo shows the text "undefined" prior to it returning.

I believe the function that is setting the value after load is Ext.form.field.ComboBox.onLoad
Another thing I just noticed is that it won't set it if the value you are trying to set is zero. This case is probably common with ids.

if (me.value) {

***Edit 2****
I tried doing an override for Ext.form.field.ComboBox on valueNotFoundText: '' but it didn't seem to change the text from "undefined"

***Edit 3****
Looks like the initial issue was fixed in 4.1b3. I guess I will report the other issue mentioned in my first edit.