Results 1 to 2 of 2

Thread: Triggering the noMoreRecords text using the listpaging plugin

  1. #1

    Default Triggering the noMoreRecords text using the listpaging plugin

    I am using the following for my list. The first set of results display correctly. There are only 4 results and the pagesize is set to 6. The problem is, the paging loader keeps loading and will not display either the empty text or the nomorerecords text.


    Is there something specific that needs to be passed back in the response to trigger the nomorerecords text?


    Code:
    this.list = new Ext.List({
        store: 'LocalDealsStore',
        plugins: [{
            ptype: 'listpaging',
            autoPaging: false,
            noMoreRecordsText: 'Plugin Empty Text'
        }],
        singleSelection: true,
        emptyText: '<p class="no-deals">No deals found matching this criteria.</p>',
        itemTpl: atd.templates.DealListItem,
        listeners: {
            selectionchange: {fn: this.onSelect, scope: this}                
        }
    });

    This is the model and proxy:
    Code:
    Ext.regModel('DealModel', {
        idProperty: 'id',
        fields: [
            {name: 'id', type: 'int'},
            {name: 'name', type: 'string'},
            {name: 'name_summary', type: 'string'},
            {name: 'price', type: 'float'},
            {name: 'discount', type: 'int'},
            {name: 'days_left', type: 'int'},
            {name: 'hours_left', type: 'int'},
            {name: 'minutes_left', type: 'int'},
            {name: 'seconds_left', type: 'int'},
            {name: 'image', type: 'string'},
            {name: 'priority', type: 'int'},
            {name: 'site', type: 'string'},
            {name: 'category', type: 'string'},
            {name: 'number_sold', type: 'int'},
            {name: 'url', type: 'string'},
            {name: 'description', type: 'string'},
            {name: 'business_name', type: 'string'},
            {name: 'business_address', type: 'string'}
        ],
        proxy: {
            type: 'scripttag',
            url: 'http://www.examples.com/api/getthelist.json',
            autoLoad: false,
            reader: {
                type: 'json',
                root: 'deals'
            }
        }
    });

    This is the response I receive when it attempts the second request.


    Code:
    stcCallback1007({"deals":[]})

  2. #2

    Default

    I've also noticed while playing around with the above that using the following to clear the store, does not reset the paging params (page, start).

    Code:
    this.list.store.data.clear();

    Is there a method that can be used to reset these values?

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
  •