{ xtype : 'list', plugins: [ { xclass: 'Ext.plugin.ListPaging', autoPaging: true,//是否滚动到页面底部的时候自动请求刷新 noMoreRecordsText : "没有更多数据了!", loadMoreText : "加载更多数据...", xclass: 'Ext.plugin.PullRefresh', pullText: '下拉刷新...', releaseText : '松开刷新...', loadingText : '请稍等...', loadedText : '加载...', lastUpdatedText : '最近刷新时间 ' } ], itemTpl : '{imgName}', name : 'topologyimglist', itemId : 'topologyimglist', emptyText : '
无数据... ', loadingText : false, store : 'xxx'//你的store,当然你也可以在其他地方绑定当前list和你的store }
当然并不是在list中加入这两个插件就能达成目的,还需要在store里面配置对应的参数:
Ext.define('TransAssistant.store.TopologyImgStore', { extend : 'Ext.data.Store', config : { storeId : 'topologyImgStore', model : 'TransAssistant.model.TopologyImgModel', pageSize: 10, proxy: { type: "ajax", //每页显示多少条的变量名,默认为limit limitParam: 'limit', //当前请求的页数的变量名,默认为page pageParam: 'page', //请求的服务器的地址 url : config.actionUrl+"listTopologyPic.action", reader: { type: "json", rootProperty: "list"//保护store数据的json变量名 } }, autoLoad: false//是否自动加载,一般为否 }});
好了,现在就算配置完成了,运行一下看看效果吧!