paginate
目的 Purpose
Creates next/previous buttons and a breadcrumb trail for pagination of results使用例 Examples
Example domain class:class Book {
String title
String author
}class BookController {
def list() {
[books: Book.list(params), bookCount: Book.count()]
}
}<g:paginate controller="book" action="list" total="${bookCount}" /><g:paginate next="Forward" prev="Back"
maxsteps="0" controller="book"
action="list" total="${bookCount}" />詳細 Description
属性 Attributes
total(required) - The total number of results to paginateaction(optional) - the name of the action to use in the link; if not specified the default action will be linkedcontroller(optional) - the name of the controller to use in the link; if not specified the current controller will be linkedid(optional) - The id to use in the linkparams(optional) - A Map of request parametersprev(optional) - The text to display for the previous link (defaults to "Previous" as defined bydefault.paginate.prevproperty in the i18nmessages.propertiesfile)next(optional) - The text to display for the next link (defaults to "Next" as defined bydefault.paginate.nextproperty in the i18nmessages.propertiesfile)omitPrev(optional) - If set to true, the previous link will never be shownomitNext(optional) - If set to true, the next link will never be shownomitFirst(optional) - If set to true, the first page link will only be shown when the first page is within the offsetomitLast(optional) - If set to true, the last page link will only be shown when the last page is within the offsetmax(optional) - The number of records to display per page (defaults to 10). Used ONLY ifparams.maxis emptymaxsteps(optional) - The number of steps displayed for pagination (defaults to 10). Used ONLY ifparams.maxstepsis emptymapping(optional) - The named URL mapping to use to rewrite the linkoffset(optional) - Used ONLY ifparams.offsetis empty

