{ xtype : 'list', plugins: [ { xclass: 'Ext.plugin.ListPaging', autoPaging: true,//是否滚动到页面底部的时候自动请求刷新 noMoreRecordsText : "没有更多数据了!", loadMoreText : "加载更多数据...", xclass: 'Ext.plugin.PullRefresh', pullText: '下拉刷新...', releaseText : '松开刷新...', loadingText : '请稍等...', loadedText : '加载...', lastUpdatedText : '最近刷新时间 ' } ], itemTpl : '<image style="width:20px;" src="resources/images/tp.png"></image><span style="font-size:0.8em;">{imgName}</span>', name : 'topologyimglist', itemId : 'topologyimglist', emptyText : '<table style="width:100%;"><tr><td style="text-align:center;">无数据... </td></tr></table>', loadingText : false, store : 'xxx'//你的store,固然你也能够在其余地方绑定当前list和你的store }
固然并非在list中加入这两个插件就能达成目的,还须要在store里面配置对应的参数:ajax
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//是否自动加载,通常为否 } });
好了,如今就算配置完成了,运行一下看看效果吧!json