Grails graphical search plugin with error message

I have a search plugin installed in my application where I want to put a search box looking through items from my DB. I modified the controller as follows to search efficiently. My domain class looks like this

class User {
    String category
    String product

    static searchable = true
}

      

and my controller where i made changes looks like

def index(Integer max) {
    def userList
    def userCount
    if (params.q) {
        userList = User.search(params.q + "*").results
        userCount =  userList.size()
    } else {
        userList = User.list(params)
        userCount = User.count()
    }
    params.max = Math.min(params.max ? params.max.toInteger() : 10, 100)
    respond User.list(params), model:[userInstanceList: userList, userInstanceTotal: userCount ]
}

      

After launch

No method signature: java.lang.Integer.call () is applicable for argument types :()

...

+3


source to share





All Articles