2012-08-30 39 views
2

我有一個應用程序,其中有大約1000條記錄要顯示在sencha liststore中。如果我嘗試一次填充所有數據,則需要很長時間才能刷新列表(大約1分鐘)。如何在用戶滾動到列表結尾時更新Sencha觸摸列表

現在我想加載列表與最初的20條記錄,然後它應該加載下20用戶向下滾動。用戶滾動到列表結尾時如何捕獲事件?

+0

你必須使用它的listpaging插件。 –

+0

@NareshTank。當滾動時用戶到達列表的結尾時,我們是否可以找到事件? –

+2

檢查此文件http://docs.sencha.com/touch/2-0/#!/api/Ext.plugin.ListPaging –

回答

4

這是Secncha Doc site

Ext.create('Ext.dataview.List', { 
    config: { 
     plugins: [ 
      { 
       xclass: 'Ext.plugin.PullRefresh', 
       pullRefreshText: 'Pull to refresh...' 
      }, 
      { 
       xclass: 'Ext.plugin.ListPaging', 
       autoPaging: true 
      } 
     ], 

     itemTpl: '<div class="item">{title}</div>', 
     store: 'Items' 
    } 
}); 

從我,我將代替xclass摘錄: '' 你也可以使用的xtype: 'listpaging'。它也有效...

Cheers,Oleg

PS。如果它仍然不清楚粘貼您的代碼片段在這裏...

0

要添加到oleg sencha不分頁,即您的分頁邏輯必須在服務器端插件只能增加頁面參數1可以配置在商店的ajaxProxy中的pageParam配置