var typelistStore =new Ext.data.JsonStore({
url: '<%=path %>/Type_showTypeByCommunityId.action?',
baseParams: {'anType.start': 0, 'anType.limit': 1, 'anType.communityId':communityId},
root: 'datas',
fields: ['typeId', 'typeName','typeOrder','communityId','state'],
autoLoad: true
});
bbar: new Ext.PagingToolbar({
store: typelistStore,
displayInfo: true,
displayMsg:"显示 {0} - {1} 条 共 {2} 条",
emptyMsg: "无显示数据",
pageSize: 1,
doLoad: function(start){
this.store.load({params: {'anType.start': start}});
}})
这样时系统一直翻页时报错,查了很长时间终于找到了原因改为
bbar: new Ext.PagingToolbar({
store: typelistStore,
displayInfo: true,
displayMsg:"显示 {0} - {1} 条 共 {2} 条",
emptyMsg: "无显示数据",
pageSize: 1,
doLoad: function(start){
this.store.baseParams.start = start;
this.store.load({params: {'anType.start': start}});
}})
这样就可以了主要原因是this.store.baseParams.start = start;这句话的添加,具体分析了下原因是传递参数名称anType.start这个的原因,如果将参数名称改为start就不会出现这个问题,Ext.PagingToolbar里面翻页机制传递的参数名称就是start,如果如果传递的参数重名的话this.store.baseParams.start的值自动传入了start否则要单独赋值