Help with pagination and searching

F

frocco

Guest
Hello,

How do I do a search and then list results with pagination.
I am getting this error:
Class:eek:rg.codehaus.groovy.runtime.metaclass.MethodSelectionExceptionMessage:Could not find which method count() to invoke from this list: public java.lang.Number java.util.Collection#count(groovy.lang.Closure) public

Code:
params.max = Math.min(params.max ? params.int('max') : 5, 100)
def resultsMap = Race.findAllByNameLike("%${params.q}%", params)
		
render(view:'list',model:[ raceInstanceList: resultsMap, raceInstanceTotal: resultsMap.count() ])
 
Top