paginate

Purpose

Creates next/previous buttons and a breadcrumb trail to allow pagination of results

Examples

Example domain class:

class Book {
     String title
     String author
}

Example controller:

class BookController {
  def list = {
     [books: Book.list(params)]
  }
}

Paginate code:

<g:paginate controller="book" action="list" total="${Book.count()}" />

or

<g:paginate next="Forward" prev="Back"
            maxsteps="0" controller="book"
            action="list" total="${Book.count()}" />

Description

Attributes

Source

Show Source