We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    I'm working on an ExtJS grid and every time I do anything that refreshes the data, the connector and processor get called twice -- each time returning the whole data set.

    To see this in action, run Batcher. On the Template tab, turn on Firebug and click on the "Clear Filter" button. In Console/Response, you can see the connector being called twice and the whole data set in both responses. I've tried giving the buttons different IDs and giving the functions different names -- no luck.

    It's not a big deal in Batcher, but my processors are going to take much longer to respond and use a lot of resources. I hate to have them run twice. I've verified that the processor is executing twice by logging it in the error log.
      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
      • 39194
      • 149 Posts
      ,clearFilter: function() {
          this.getStore().baseParams = {
              action: 'mgr/template/getList'
      	};
          Ext.getCmp('batcher-search').reset();
      	this.getBottomToolbar().changePage(1);
          this.refresh();
      }


      Both lines invoke data reloading:
          this.getBottomToolbar().changePage(1);
          this.refresh();
        • 3749
        • 24,544 Posts
        Good catch. Thanks!

        Any opinion on which one to keep?
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting