Results 1 to 3 of 3

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
    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
    6
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      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 @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 Premium Member
    Join Date
    Jun 2012
    Posts
    6
    Vote Rating
    0
      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?

Posting Permissions

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