bbar: new Ext.PagingToolbar({ 
       pageSize: 5, 
       store: this.store, 
       displayInfo: true, 
       displayMsg: "显示第{0}-{1}条,共有{2}条记录",//这里是动态显示,带格式化字符串的; 
       emptyMsg: "没有记录" 
 }), 
其中displayMsg: "显示第{0}-{1}条,共有{2}条记录"中的{0}{1}{2}分别是怎么带过来的呢

解决方案 »

  1.   

    不全
    给你个参考:
    http://www.cnblogs.com/yjmyzz/archive/2008/08/30/1280282.html
      

  2.   

    首先前台要得到分页的数据,后台会输出一个json格式的字符串如:
    {'results':100,'items':[{'id':'test','name':'text'},{}....]}
    共有{2}条记录 就是results后面的值
    显示第{0}-{1}条,其实是extjs自己内部js算出来的,是靠
    store.load( {
    params : {
    start : 0,
    limit : PageSize,
    foo : 'bar'
    }
    });
      中的 start 和 limit 算出来的。
      

  3.   

     String.format(
                        this.displayMsg,
                        this.cursor+1, this.cursor+count, this.store.getTotalCount()
                    );
    看一下ext-all-debug.js