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 Answers
0
votes
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)