Results 1 to 5 of 5

Thread: PagingToolbar triggers two ajax requests if change listener executes store.load()

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Mar 2017
    Posts
    3

    Default PagingToolbar triggers two ajax requests if change listener executes store.load()

    Hi,
    PagingToolbar has a change listener and contains a few lines of code to configure store proxy parameter's start with the updated start value.
    i.e.
    ......
    ......
    .......
    listeners: {
    change: function (pageToolBar, pageData) {
    var start = pageToolBar.store.proxy.extraParams.start;
    var newStart = pageData.fromRecord - 1;
    if (newStart !== start) {
    pageToolBar.store.proxy.extraParams.start = newStart;
    pageToolBar.store.load(); // refresh store with newStart
    }
    }
    }

    The problem with this is - when we click on the next button of page toolbar, it makes a request with the start value=0 and then fires a change event. Inside the change event, we have updated the value of start with the new start and making a store to reload- this triggers another request.
    So we have two requests in total and so not acceptable from performance and resource utilization point of view,

    The same thing is happening with grid sorting, if we add sortchange event and make some change before, ajax request, it triggers one request with the same configuration and then again triggers request from the sortchange event after changing required parameters.

  2. #2
    Sencha - Forum Administrator
    Join Date
    Sep 2017
    Posts
    1,005

    Default

    Thank you for bringing this to our attention. I have shared this with the support team to look into further.

    Michele

  3. #3
    Sencha User
    Join Date
    Mar 2017
    Posts
    3

    Default

    Thank You, Michele, I am waiting for the reply from the support team.

  4. #4
    Ext Support Team
    Join Date
    Jan 2018
    Posts
    567

    Default

    Hi,

    I have created a fiddle to demonstrate this, please check the below fiddle and this will help you in fixing this issue.

    https://fiddle.sencha.com/#view/editor&fiddle/2rc4

    Regards,
    Kumar
    Sencha Support.

  5. #5
    Sencha Premium User
    Join Date
    Nov 2013
    Location
    Piacenza, Italy
    Posts
    220

    Default

    Hello,
    I'm interested in this bug, but which version of Ext JS are you talking about? And how this fiddle should demostrate this?

    Thanks

Similar Threads

  1. Customizing load mask while running AJAX requests
    By varunjyoti in forum Ext 5: Q&A
    Replies: 3
    Last Post: 11 Jun 2015, 7:42 PM
  2. [FIXED] Combo with store triggers store load, without autoLoad
    By svenna in forum Ext:Bugs
    Replies: 26
    Last Post: 11 Apr 2013, 8:02 AM
  3. PagingToolbar and Ajax requests
    By grigory666 in forum Ext 3.x: Help & Discussion
    Replies: 22
    Last Post: 14 Apr 2010, 1:51 AM
  4. Change listener is not working in PagingToolbar
    By Rajarajeswari MS in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 13 Jul 2009, 7:34 AM

Tags for this Thread

Posting Permissions

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