1. #1
    Sencha User
    Join Date
    Oct 2011
    Location
    Austin, TX
    Posts
    43
    Vote Rating
    0
    tthai is on a distinguished road

      0  

    Default Unanswered: How to reset startParam value after a loadMore action with ListPaging

    Unanswered: How to reset startParam value after a loadMore action with ListPaging


    Hello, after hitting the load more text when using the ListPaging plugin, the paging does not seem to reset itself when I goto another view that uses the same store. It basically keeps the startParam value the same as the last request. How do we automatically have it reset, without clearing out all other params in the model proxy configuration.

    I've tried setting my startParam property (item_per_page) to 0 but then the listPaging plugin stops working as in it does not set the next startParam value.

    // proxy config in model
    Code:
     proxy: {
                type: 'rest',
                url: mysite.com
                reader: {
                    type: 'json',
                    rootProperty: 'videos',
                    totalProperty: 'total_results'
                },
                extraParams: {
                    format: 'json'
                    'items_per_page': 10,
                },      
                simpleSortMode: true, 
                sortParam: 'sort_order',
                startParam: 'start_index',
                limitParam: 'items_per_page'
            }
    store and proxy params
    Code:
    proxy = this.videoStore.getProxy();
      proxy.setExtraParams({
                'site_id': 1,
                'assoc_type': 'coverage',
                'assoc_id': this.event.getId(),
                  
            });

  2. #2
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      1  

    Default


    store.loadPage(1);

Thread Participants: 1