Sencha-touch : refresh list : store

后端 未结 3 1364
后悔当初
后悔当初 2020-12-30 15:57

I have a list of news in a Ext.List inside a panel

prj.views.NewsList = Ext.extend(Ext.Panel, {
    layout: \'card\',
    initComponent: function() {     
           


        
3条回答
  •  星月不相逢
    2020-12-30 16:15

    Call this line on your refresh button

    Ext.StoreMgr.get('newsStore').load()
    

    The list is automaticaly refresh when you call the load() method on the store. The store is linked to the list.

    Example:

    items: [
        {
            iconCls: 'refresh',     
            handler: function(event, btn) {
                Ext.StoreMgr.get('newsStore').load();
            }           
        },
    ]
    

提交回复
热议问题