PaginatorSnippet

olon.http.PaginatorSnippet
trait PaginatorSnippet[T] extends Paginator[T]

This is the paginator snippet. It provides page navigation and column sorting links.

The values for the pagination are bound according to the classes specified in the paginate method, using a CSS selector transform.

Attributes

Graph
Supertypes
trait Paginator[T]
trait Loggable
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Concrete methods

The status displayed when using <nav:records/> in the template.

The status displayed when using <nav:records/> in the template.

Attributes

override 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.

Attributes

Definition Classes

The "first page" link text

The "first page" link text

Attributes

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)

Attributes

The "last page" link text

The "last page" link text

Attributes

The "next page" link text

The "next page" link text

Attributes

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

Attributes

def pageUrl(offset: Long): String

Returns a URL used to link to a page starting at the given record offset.

Returns a URL used to link to a page starting at the given record offset.

Attributes

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.

Value parameters

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

Attributes

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.

Attributes

def paginate: CssSel

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.

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.

Classes used to bind:

  • first: link to go back to the first page (populated by [[firstXml]])
  • prev: link to go to previous page (populated by [[prevXml]])
  • all-pages: container for all pages (populated by [[pagesXml]])
  • zoomed-pages: container for zoomedPages (populated by [[pagesXml]])
  • next: link to go to next page (populated by [[nextXml]])
  • last: link to go to last page (populated by [[lastXml]])
  • records: currently visible records + total count (populated by [[currentXml]])
  • records-start: start of currently visible records
  • records-end: end of currently visible records
  • records-count: total records count

Attributes

The "previous page" link text

The "previous page" link text

Attributes

How to display the page's starting record

How to display the page's starting record

Attributes

How to display the page's ending record

How to display the page's ending record

Attributes

Inherited methods

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.'

Attributes

Inherited from:
Paginator

How many items to put on each page

How many items to put on each page

Attributes

Inherited from:
Paginator
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

Attributes

Inherited from:
Paginator

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.

Attributes

Inherited from:
Paginator

Inherited and Abstract methods

def count: Long

The total number of items

The total number of items

Attributes

Inherited from:
Paginator
def page: Seq[T]

The items displayed on the current page

The items displayed on the current page

Attributes

Inherited from:
Paginator

Concrete fields

protected var _first: Long

Inherited fields

protected val logger: Logger

Attributes

Inherited from:
Loggable