Results 1 to 2 of 2

Thread: Ext.plugin.ListPaging and Ext.plugin.PullRefresh duplicates items

  1. #1

    Default Ext.plugin.ListPaging and Ext.plugin.PullRefresh duplicates items


    I've found several posts talking about this issue, but none of them seems to be fully applicable to this specific case.

    I'm fetching data from a jsonp feed (similarly to what is done by the "Getting Started with Sencha Touch 2" guide).

    This works fine, but both Ext.plugin.ListPaging and Ext.plugin.PullRefresh plugins duplicates data when activated.

    As far as I've understood this is caused by the missing idProperty, but frankly I don't know how and where to set it from a feed.
    This feed doesn't have any ID, unless you would consider the title an ID and even in this case, I don't have a model where to set this ID, as the feed is not controlled by me.

    Here's the config section of my view:
        config: {
            title: 'News',
            iconCls: 'star',
            items: {
                xtype: 'list',
                plugins: [
                        xclass: 'Ext.plugin.ListPaging', autoPaging: true
                        xclass: 'Ext.plugin.PullRefresh',
                        pullRefreshText: 'Pull down for more news!',
                        releaseRefreshText: 'Release to refresh...'
                emptyText: '<p class="no-searches">No news found</p>',
                itemTpl: Ext.create('Ext.XTemplate',
                    '<div class="news-item">',
                    '<span class="posted">{[this.posted(values.publishedDate)]}</span>',
                        posted: timeAgoInWords
                title: 'Latest News',
                store: {
                    autoLoad: true,
                    fields: ['title', 'author', 'content', 'contentSnippet', 'publishedDate'],
                    proxy: {
                        type: 'jsonp',
                        url: '',
                        reader: {
                            type: 'json',
                            rootProperty: 'responseData.feed.entries'

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL


    There isn't a solid way to know what record to check if it exists on pull refresh. You need to have an id so it can know if the record exists or not.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:

    Posts are my own, not any current, past or future employer's.

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