Search code examples
javascriptextjssencha-touchsencha-touch-2pull-to-refresh

List is not getting displayed in Sencha touch 2.2


I want to provide a list with pull to refresh functionality. Below is my code where i have a panel and inside that i have a list.

Ext.define('MyProj.common.view.notes.NotesOverlay', {
    extend: 'Ext.form.Panel',
    xtype: 'notesOverlay',

    config: {

        style: 'box-shadow: 10px 10px 5px #888888;border-radius: 20px;',
        items: [{
                // Toolbar to be displayed on the Notes overlay
                xtype: 'toolbar',
                ui: 'light',
                docked: 'top',
                //margin:'0 0 20 0',
                //  id:'notesbar',
                items: []
            },
            // List that contains the list of notes 
            {
                xtype: 'list',
                height: 500,
                allowDeselect: true,
                action: 'notesList',
                itemTpl: '{title}',
                data: [{
                        title: 'Item 1'
                    }, {
                        title: 'Item 2'
                    }, {
                        title: 'Item 3'
                    }, {
                        title: 'Item 4'
                    }
                ],

                plugins: [{
                        xclass: 'Ext.plugin.PullRefresh',
                        pullRefreshText: 'Pull down to refresh the list'
                    }
                ]


            },

        ]
    }
});

I have included the pullRefresh plugin within the list as shown above. two days back i upgraded project's sencha touch framework to 2.2, from then on the list disappears. when i remove the plugin the list is displayed fine.

Please let me know where im going wrong.

thanks in advance.


Solution

  • As Sha's comment, the PullRefresh plugin has compatibility issues with ST version.docs.sencha.com/touch/2.2.0/#!/api/Ext.plugin.PullRefresh