Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    4
    Vote Rating
    0
    troycobb is on a distinguished road

      0  

    Default Stores do not load their own records if events are suppressed for them

    Stores do not load their own records if events are suppressed for them


    A store will not load its own records into its data member if events are suppressed.

    The store uses the onDataRefresh event to trigger loading the records into data. It will properly return the records to the callback registered during the .load() call, but will not load them internally.

    SDK Version 2.0.1.1

    It happens in data/Store.js, on line 1901 in the onProxyLoad method. If the proxy was successful, it attempts to fire the 'datarefresh' event. It also sends a callback with that firing that should have been called after all the event handlers (Store.doDataRefresh). However, if you trace into the mixin/Observable class fireAction and then doFireEvent, we find that the method returns immediately if events are suppressed, not bothering to call the registered callback.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,408
    Vote Rating
    851
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    IMO this is an application issue, you shouldn't have the store's events suspended when trying to take action like this.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    4
    Vote Rating
    0
    troycobb is on a distinguished road

      0  

    Default


    That's a short-sighted answer. There are plenty of reasons one might want to suppress events while a store is loading -- for instance, if a DataView is tied to a store and you don't want the dataview to refresh right away.

    Regardless, the way it currently performs is undocumented, and feels like a bug. There shouldn't be anything that a typical use of the API could do that would cause a store to *appear* to be successful at loading its records (including returning "success" to the callback) but still not internally load the records.

    How do I get this reported as a bug so that it can be addressed?

Thread Participants: 1