bbar: new Ext.PagingToolbar({
pageSize: 5,
store: this.store,
displayInfo: true,
displayMsg: "显示第{0}-{1}条,共有{2}条记录",//这里是动态显示,带格式化字符串的;
emptyMsg: "没有记录"
}),
其中displayMsg: "显示第{0}-{1}条,共有{2}条记录"中的{0}{1}{2}分别是怎么带过来的呢
pageSize: 5,
store: this.store,
displayInfo: true,
displayMsg: "显示第{0}-{1}条,共有{2}条记录",//这里是动态显示,带格式化字符串的;
emptyMsg: "没有记录"
}),
其中displayMsg: "显示第{0}-{1}条,共有{2}条记录"中的{0}{1}{2}分别是怎么带过来的呢
给你个参考:
http://www.cnblogs.com/yjmyzz/archive/2008/08/30/1280282.html
{'results':100,'items':[{'id':'test','name':'text'},{}....]}
共有{2}条记录 就是results后面的值
显示第{0}-{1}条,其实是extjs自己内部js算出来的,是靠
store.load( {
params : {
start : 0,
limit : PageSize,
foo : 'bar'
}
});
中的 start 和 limit 算出来的。
this.displayMsg,
this.cursor+1, this.cursor+count, this.store.getTotalCount()
);
看一下ext-all-debug.js