org.displaytag.pagination
Class PaginatedListSmartListHelper

java.lang.Object
  extended by org.displaytag.pagination.SmartListHelper
      extended by org.displaytag.pagination.PaginatedListSmartListHelper

public class PaginatedListSmartListHelper
extends SmartListHelper

An implementation of SmartListHelper used for externally sorted and paginated lists. It duplicates nearly all of its superclass, so these two classes should be refactored

Author:
JBN

Constructor Summary
PaginatedListSmartListHelper(PaginatedList paginatedList, TableProperties tableProperties)
           
 
Method Summary
 int getFirstIndexForCurrentPage()
          Returns the index into the master list of the first object that should appear on the current page that the user is viewing.
protected  int getFirstIndexForPage(int pageNumber)
          Returns the index into the master list of the first object that should appear on the given page.
protected  int getLastIndexForCurrentPage()
          Returns the index into the master list of the last object that should appear on the current page that the user is viewing.
protected  int getLastIndexForPage(int pageNumber)
          Returns the index into the master list of the last object that should appear on the given page.
 java.util.List getListForCurrentPage()
          Returns a subsection of the list that contains just the elements that are supposed to be shown on the current page the user is viewing.
protected  java.util.List getListForPage(int pageNumber)
          Returns a subsection of the list that contains just the elements that are supposed to be shown on the given page.
 java.lang.String getPageNavigationBar(Href baseHref, java.lang.String pageParameter)
          Returns a string containing the nagivation bar that allows the user to move between pages within the list.
 java.lang.String getSearchResultsSummary()
          Return the little summary message that lets the user know how many objects are in the list they are viewing, and where in the list they are currently positioned.
 java.lang.String toString()
           
 
Methods inherited from class org.displaytag.pagination.SmartListHelper
computedPageCount, setCurrentPage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PaginatedListSmartListHelper

public PaginatedListSmartListHelper(PaginatedList paginatedList,
                                    TableProperties tableProperties)
Method Detail

getFirstIndexForCurrentPage

public int getFirstIndexForCurrentPage()
Description copied from class: SmartListHelper
Returns the index into the master list of the first object that should appear on the current page that the user is viewing.

Overrides:
getFirstIndexForCurrentPage in class SmartListHelper
Returns:
int index of the first object that should appear on the current page

getFirstIndexForPage

protected int getFirstIndexForPage(int pageNumber)
Description copied from class: SmartListHelper
Returns the index into the master list of the first object that should appear on the given page.

Overrides:
getFirstIndexForPage in class SmartListHelper
Parameters:
pageNumber - page number
Returns:
int index of the first object that should appear on the given page

getLastIndexForCurrentPage

protected int getLastIndexForCurrentPage()
Description copied from class: SmartListHelper
Returns the index into the master list of the last object that should appear on the current page that the user is viewing.

Overrides:
getLastIndexForCurrentPage in class SmartListHelper
Returns:
int

getLastIndexForPage

protected int getLastIndexForPage(int pageNumber)
Description copied from class: SmartListHelper
Returns the index into the master list of the last object that should appear on the given page.

Overrides:
getLastIndexForPage in class SmartListHelper
Parameters:
pageNumber - page number
Returns:
int index of the last object that should appear on the given page

getListForCurrentPage

public java.util.List getListForCurrentPage()
Description copied from class: SmartListHelper
Returns a subsection of the list that contains just the elements that are supposed to be shown on the current page the user is viewing.

Overrides:
getListForCurrentPage in class SmartListHelper
Returns:
List subsection of the list that contains the elements that are supposed to be shown on the current page

getListForPage

protected java.util.List getListForPage(int pageNumber)
Description copied from class: SmartListHelper
Returns a subsection of the list that contains just the elements that are supposed to be shown on the given page.

Overrides:
getListForPage in class SmartListHelper
Parameters:
pageNumber - page number
Returns:
List subsection of the list that contains just the elements that are supposed to be shown on the given page

getPageNavigationBar

public java.lang.String getPageNavigationBar(Href baseHref,
                                             java.lang.String pageParameter)
Description copied from class: SmartListHelper
Returns a string containing the nagivation bar that allows the user to move between pages within the list. The urlFormatString should be a URL that looks like the following: somepage.page?page={0}

Overrides:
getPageNavigationBar in class SmartListHelper
Parameters:
baseHref - Href used for links
pageParameter - name for the page parameter
Returns:
String

getSearchResultsSummary

public java.lang.String getSearchResultsSummary()
Description copied from class: SmartListHelper
Return the little summary message that lets the user know how many objects are in the list they are viewing, and where in the list they are currently positioned. The message looks like: nnn [item(s)] found, displaying nnn to nnn. [item(s)] is replaced by either itemName or itemNames depending on if it should be signular or plural.

Overrides:
getSearchResultsSummary in class SmartListHelper
Returns:
String

toString

public java.lang.String toString()
Overrides:
toString in class SmartListHelper
See Also:
Object.toString()


Copyright © 2002-2010 the Displaytag team. All Rights Reserved.