Using pagination with Controller action other than the default list

By default ‘list’ pages are generated to use the <paginate> tag, and this invokes the list action to retrieve the next set of results.

If you are using an action other than the default list action, include the action="" attribute on the tag to use an alternative action method:

<code>&lt;g:paginate action="${listType}" total="${Purchase.count()}" /&gt;</code>

In the above example the action method is the result of a value set from the previous action method to indicate which action method is to be used.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.