Grails extJS grid paging

℡╲_俬逩灬. 提交于 2019-12-11 13:57:17

问题


Hy, I have a problem with extjs and grails. When I a try call the next page of the grid, I don't have the objects. The grid still with the old objects. How can I do to paginate my grid?


回答1:


add below to your store cfg:

paramNames: {start:'offset',limit:'max',sort:'sort',dir:'order'},
baseParams: {offset:0,max:this.pageSize},

then the controller:

def result = Floor.createCriteria().list(
   max:params.int('max')?:100, 
   offset:params.int('offset')?:0
) 
render ([count:result.totalCount,data:result] as JSON)


来源:https://stackoverflow.com/questions/4548892/grails-extjs-grid-paging

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!