-
21 Feb 2012 10:47 AM #1
4.1 B2 - loadRecord combos contain "undefined" prior to load
4.1 B2 - loadRecord combos contain "undefined" prior to load
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 #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
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.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
21 Feb 2012 11:47 AM #3
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.
****Edit****
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.
***Edit 2****Code:if (me.value) { me.setValue(me.value);
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.


Reply With Quote