Pagination grails example
Example 1: pagination in grails
def criteria = Person.createCriteria()
def result = criteria.list {
eq ('firstName', 'John')
order('lastName', 'asc')
firstResult(0)
maxResults(10)
}
Example 2: pagination in grails
def criteria = Person.createCriteria()
def result = criteria.list (max:10, offset:0) {
eq ('firstName', 'John')
}