trait SortedPaginatorSnippet[T, C] extends SortedPaginator[T, C] with PaginatorSnippet[T]
This trait adds snippet functionality for sorted paginators. You can place bind points in your template for column headers, and it turns them into links That you can click to sort by that column. Simply write, e.g., <th><sort:name/></th><th><sort:email/></th> etc.
- Alphabetic
- By Inheritance
- SortedPaginatorSnippet
- PaginatorSnippet
- SortedPaginator
- Paginator
- Loggable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type SortState = (Int, Boolean)
Pair of (column index, ascending)
Pair of (column index, ascending)
- Definition Classes
- SortedPaginator
Abstract Value Members
- abstract def count: Long
The total number of items
The total number of items
- Definition Classes
- Paginator
- abstract def headers: List[(String, C)]
The sort headers: pairs of column labels, and column identifier objects of type C.
The sort headers: pairs of column labels, and column identifier objects of type C.
- Definition Classes
- SortedPaginator
- abstract def page: Seq[T]
The items displayed on the current page
The items displayed on the current page
- Definition Classes
- Paginator
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val _first: Long
- Attributes
- protected
- Definition Classes
- PaginatorSnippet
- val _sort: SortState
- Attributes
- protected
- Definition Classes
- SortedPaginator
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def ascendingParam: String
The URL query parameter to specify the sort direction
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def curPage: Int
Calculates the current page number, based on the value of 'first.'
Calculates the current page number, based on the value of 'first.'
- Definition Classes
- Paginator
- def currentXml: NodeSeq
The status displayed when using <nav:records/> in the template.
The status displayed when using <nav:records/> in the template.
- Definition Classes
- PaginatorSnippet
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def first: Long
Overrides the super's implementation so the first record can be overridden by a URL query parameter.
Overrides the super's implementation so the first record can be overridden by a URL query parameter.
- Definition Classes
- PaginatorSnippet → Paginator
- def firstXml: NodeSeq
The "first page" link text
The "first page" link text
- Definition Classes
- PaginatorSnippet
- def first_=(f: Long): Unit
Sets the default starting record of the page (URL query parameters take precedence over this)
Sets the default starting record of the page (URL query parameters take precedence over this)
- Definition Classes
- PaginatorSnippet
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def itemsPerPage: Int
How many items to put on each page
How many items to put on each page
- Definition Classes
- Paginator
- def lastXml: NodeSeq
The "last page" link text
The "last page" link text
- Definition Classes
- PaginatorSnippet
- val logger: Logger
- Attributes
- protected
- Definition Classes
- Loggable
- Annotations
- @transient()
- def navPrefix: String
The template prefix for general navigation components
The template prefix for general navigation components
- Definition Classes
- PaginatorSnippet
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nextXml: NodeSeq
The "next page" link text
The "next page" link text
- Definition Classes
- PaginatorSnippet
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def numPages: Int
Calculates the number of pages the items will be spread across
Calculates the number of pages the items will be spread across
- Definition Classes
- Paginator
- def offsetParam: String
The URL query parameter to propagate the record the page should start at
The URL query parameter to propagate the record the page should start at
- Definition Classes
- PaginatorSnippet
- def pageUrl(offset: Long): String
Overrides pageUrl and delegates to sortedPageUrl using the current sort
Overrides pageUrl and delegates to sortedPageUrl using the current sort
- Definition Classes
- SortedPaginatorSnippet → PaginatorSnippet
- def pageXml(newFirst: Long, ns: NodeSeq): NodeSeq
Returns XML that links to a page starting at the given record offset, if the offset is valid and not the current one.
Returns XML that links to a page starting at the given record offset, if the offset is valid and not the current one.
- ns
The link text, if the offset is valid and not the current offset; or, if that is not the case, the static unlinked text to display
- Definition Classes
- PaginatorSnippet
- def pagesXml(pages: Seq[Int])(sep: NodeSeq): NodeSeq
Generates links to multiple pages with arbitrary XML delimiting them.
Generates links to multiple pages with arbitrary XML delimiting them.
- Definition Classes
- PaginatorSnippet
- def paginate: CssSel
This method binds template HTML based according to the specified configuration.
This method binds template HTML based according to the specified configuration. You can reference this as a snippet method directly in your template; or you can call it directly as part of your binding code.
In addition to the classes bound in
PaginatorSnippet, for each header in theheaderslist, this will bind elements with that class name and put a link in them with their contents.For example, with a list of headers
List("foo", "bar"), this would bind the.fooelement's contents to contain a link to a page that renders that column sorted, as well as the.barelement's contents to contain a link to a page that renders that column sorted.- Definition Classes
- SortedPaginatorSnippet → PaginatorSnippet
- def prevXml: NodeSeq
The "previous page" link text
The "previous page" link text
- Definition Classes
- PaginatorSnippet
- def recordsFrom: String
How to display the page's starting record
How to display the page's starting record
- Definition Classes
- PaginatorSnippet
- def recordsTo: String
How to display the page's ending record
How to display the page's ending record
- Definition Classes
- PaginatorSnippet
- def sort: SortState
Overrides sort, giving the URL query parameters precedence
Overrides sort, giving the URL query parameters precedence
- Definition Classes
- SortedPaginatorSnippet → SortedPaginator
- def sortParam: String
The URL query parameter to specify the sort column
- def sortPrefix: String
The prefix to bind the sorting column headers
- def sort_=(s: SortState): Unit
Set the current sort state: Pair of (column index, ascending?)
Set the current sort state: Pair of (column index, ascending?)
- Definition Classes
- SortedPaginator
- def sortedBy(column: Int): SortState
Returns a new SortState based on a column index.
Returns a new SortState based on a column index. If the paginator is already sorted by that column, it toggles the direction; otherwise the direction is ascending. Note that this method does not alter the sort state in the paginator; it only calculates the direction toggle. Example usage: sortedPaginator.sort = sortedPaginator.sortedBy(columns.indexOf(clickedColumn))
- Definition Classes
- SortedPaginator
- def sortedPageUrl(offset: Long, sort: (Int, Boolean)): String
Calculates the page url taking sorting into account.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def zoomedPages: List[Int]
Returns a list of page numbers to be displayed in 'zoomed' mode, i.e., as the page numbers get further from the current page, they are more sparse.
Returns a list of page numbers to be displayed in 'zoomed' mode, i.e., as the page numbers get further from the current page, they are more sparse.
- Definition Classes
- Paginator