Class PagingNavigationLink<T>

Type Parameters:
T - type of model object
All Implemented Interfaces:
Serializable, Iterable<Component>, IEventSink, IEventSource, IFeedbackContributor, IConverterLocator, IGenericComponent<T,Link<T>>, IMetadataContext<Serializable,Component>, IRequestListener, IHeaderContributor, IRequestableComponent, IHierarchical<Component>, IClusterable
Direct Known Subclasses:
AjaxPagingNavigationLink

public class PagingNavigationLink<T> extends Link<T>
A link to a page of a PageableListView.
Author:
Jonathan Locke, Eelco Hillenius, Martijn Dashorst
See Also:
  • Field Details

  • Constructor Details

    • PagingNavigationLink

      public PagingNavigationLink(String id, IPageable pageable, long pageNumber)
      Constructor.
      Parameters:
      id - See Component
      pageable - The pageable component for this page link
      pageNumber - The page number in the PageableListView that this link links to. Negative pageNumbers are relative to the end of the list.
  • Method Details

    • onClick

      public void onClick()
      Description copied from class: Link
      Called when a link is clicked.
      Specified by:
      onClick in class Link<T>
      See Also:
    • getPageNumber

      public final long getPageNumber()
      Get pageNumber.
      Returns:
      pageNumber.
    • cullPageNumber

      protected long cullPageNumber(long pageNumber)
      Allows the link to cull the page number to the valid range before it is retrieved from the link
      Parameters:
      pageNumber -
      Returns:
      culled page number
    • isFirst

      public final boolean isFirst()
      Returns:
      True if this page is the first page of the containing PageableListView
    • isLast

      public final boolean isLast()
      Returns:
      True if this page is the last page of the containing PageableListView
    • linksTo

      public final boolean linksTo(Page page)
      Returns true if this PageableListView navigation link links to the given page.
      Overrides:
      linksTo in class Link<T>
      Parameters:
      page - The page
      Returns:
      True if this link links to the given page
      See Also: