1. #1
    Sencha Premium Member Tim Toady's Avatar
    Join Date
    Feb 2010
    Location
    Delaware
    Posts
    494
    Vote Rating
    48
    Tim Toady has a spectacular aura about Tim Toady has a spectacular aura about Tim Toady has a spectacular aura about

      0  

    Default 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?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,714
    Vote Rating
    438
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    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.

  3. #3
    Sencha Premium Member Tim Toady's Avatar
    Join Date
    Feb 2010
    Location
    Delaware
    Posts
    494
    Vote Rating
    48
    Tim Toady has a spectacular aura about Tim Toady has a spectacular aura about Tim Toady has a spectacular aura about

      0  

    Default


    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.
    Code:
                if (me.value) {          
                     me.setValue(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.