Class PagingNavigationIncrementLink<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:
AjaxPagingNavigationIncrementLink

public class PagingNavigationIncrementLink<T> extends Link<T>
An incremental link to a page of a PageableListView. Assuming your list view navigation looks like
 
         [first / << / <] 1 | 2 | 3 [> / >> /last]
 
 

and "<" meaning the previous and "<<" goto the "current page - 5", than it is this kind of incremental page links which can easily be created.

Author:
Juergen Donnerstag, Martijn Dashorst
See Also:
  • Field Details

    • pageable

      protected final IPageable pageable
      The PageableListView the page links are referring to.
  • Constructor Details

    • PagingNavigationIncrementLink

      public PagingNavigationIncrementLink(String id, IPageable pageable, int increment)
      Constructor.
      Parameters:
      id - See Component
      pageable - The pageable component the page links are referring to
      increment - increment by
  • 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()
      Determines the next page number for the pageable component.
      Returns:
      the new page number
    • isFirst

      public boolean isFirst()
      Returns:
      True if it is referring to the first page of the underlying PageableListView.
    • isLast

      public boolean isLast()
      Returns:
      True if it is referring to the last page of the underlying PageableListView.
    • linksTo

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