1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    41
    Vote Rating
    2
    Answers
    1
    Golden.Vulture is on a distinguished road

      0  

    Default Unanswered: store.load() in paging toolbar

    Unanswered: store.load() in paging toolbar


    Hi,

    I am trying to server side paging.
    So, I have a paging tool bar and a store attached to it :

    {
    xtype:'pagingtoolbar',
    width:500,
    store:'SearchResultStore',
    displayInfo: true,
    displayMsg: 'Displaying topics {0} - {1} of {2}',
    emptyMsg: 'No topics to display',
    style:{
    background:'LightCyan',
    border:"solid 1px LightCyan"
    }

    }

    First thing, The style is not getting set in IE but works for FF.

    Second thing, When I click the next and last button on the toolbar it makes a get call with respective start and limit params. Since the toolbar is attached to the store I suppose there is a store.load() call has been made with such parameters
    How can I override that store.load() called by paging toolbar in a controller ?? I want to attach a callback to this store.load() and perform some operation.

  2. #2
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Vote Rating
    115
    Answers
    346
    vietits is a splendid one to behold vietits is a splendid one to behold vietits is a splendid one to behold vietits is a splendid one to behold vietits is a splendid one to behold vietits is a splendid one to behold

      0  

    Default


    PagingToolbar does not directly call store.load() but instead it will call:
    - store.loadPage(1) for moving to first page
    - store.previousPage() which then will call store.loadPage() for moving to previous page
    - store.nextPage() which then will call store.loadPage() for moving to next page
    - store.loadPage(last) for moving to last page
    - store.loadPage(current) for reload current page
    store.loadPage() will then call store.read() then store.load().

    However, before calling the above methods, PagingToolbar will fire 'beforechange' event. I think you can catch this event to prepare what you would like to do with store.load().

Thread Participants: 1

Tags for this Thread