Results 1 to 3 of 3

Thread: 4.1 B2 - loadRecord combos contain "undefined" prior to load

  1. #1
    Sencha User Tim Toady's Avatar
    Join Date
    Feb 2010
    Location
    Pennsylvania
    Posts
    603
    Vote Rating
    284
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User Tim Toady's Avatar
    Join Date
    Feb 2010
    Location
    Pennsylvania
    Posts
    603
    Vote Rating
    284
      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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •