tags:

views:

227

answers:

1

I have a page/gsp that displays 3 different classes.

This means that I need to add extra parameters to the pagination links.

currently the link auto generated by default pagination tag in grails produces links like this:

http://localhost:8080/Teams/Leader/assignFollower?offset=400&max=100

I'd like it to be something similar to this:

http://localhost:8080/Teams/Leader/assignFollower?LeaderId=1&TeamId=2&offset=400&max=100

Any ideas how I can implement this?

+3  A: 

The paginate tag accepts a params parameter. So something like:

<g:paginate
        total="${Leader.count()}"
        params="${[LeaderId:1, TeamId: 2]}" />

should do the trick.

See the docs for more: http://www.grails.org/GSP+Tag+-+paginate

Cheers!

lunohodov
thanks!!!!!!!!!
Neoryder