问题
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