com.infragistics.faces.shared.component
Class Pager

java.lang.Object
  extended byjavax.faces.component.UIComponent
      extended byjavax.faces.component.UIComponentBase
          extended bycom.infragistics.faces.shared.component.Pager
All Implemented Interfaces:
javax.faces.component.StateHolder
Direct Known Subclasses:
HtmlPager

public class Pager
extends javax.faces.component.UIComponentBase

A pager is a component providing a user interface to navigate through a large number of items. It is typically displayed as links to navigate to the first/previous/next/last page or specific page indexes.

Page Indexes
It is possible to show/hide page indexes by calling #setDisplayPageIndexes(boolean)

Facets

The following facets can be nested inside the component:
Facet Name Description
firstPage allows to specify the component used to display the "first page" link.
previousPage allows to specify the component used to display the "previous page" link.
nextPage allows to specify the component used to display the "next page" link.
lastPage allows to specify the component used to display the "last page" link.


Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static java.lang.String RENDERER_TYPE
           
 
Constructor Summary
Pager()
           
 
Method Summary
 java.lang.String getFamily()
           
 javax.faces.component.UIComponent getFirstPage()
          Return the component that is displayed to navigate to the first page
 DataList getForComponent()
          Returns the UIComponent that is linked to (or controlled by) the pager
 java.lang.String getForComponentId()
          Returns the id of the component that is linked to (or controlled by) the pager
 javax.faces.component.UIComponent getLastPage()
          Return the component that's displayed to navigate to the last page
 int getMaximumPageNumbers()
          Returns the maximum number of pages to display
 javax.faces.component.UIComponent getNextPage()
          Return the component that's displayed to navigate to the next page
 javax.faces.component.UIComponent getPreviousPage()
          Return the component that's displayed to navigate to the previous page
 boolean isFirstLastRendered()
          Returns the a flag indicating whether the first and last pages are visible or not
 boolean isPageNumbersRendered()
          Returns the a flag indicating whether page numbers are visible or not
 boolean isPreviousNextRendered()
          Returns the a flag indicating whether the previous and next pages are visible or not
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setFirstLastRendered(boolean firstLastRendered)
          Sets the a flag indicating whether the first and last pages are visible or not
 void setFirstPage(javax.faces.component.UIComponent component)
          Sets the UIComponent that is displayed to move to the first record
 void setForComponentId(java.lang.String forComponentId)
          Sets the id of the component that is linked-to or controlled by the pager
 void setLastPage(javax.faces.component.UIComponent component)
          Sets the UIComponent that is displayed to move to the last record
 void setMaximumPageNumbers(int maximumPageNumbers)
          Sets the maximum number of pages to display
 void setNextPage(javax.faces.component.UIComponent component)
          Sets the UIComponent that is displayed to move to the next record
 void setPageNumbersRendered(boolean pageNumbersRendered)
          Sets the a flag indicating whether page numbers are visible or not
 void setPreviousNextRendered(boolean previousNextRendered)
          Sets the a flag indicating whether the previous and next pages are visible or not
 void setPreviousPage(javax.faces.component.UIComponent component)
          Sets the UIComponent that is displayed to move to the previous record
 
Methods inherited from class javax.faces.component.UIComponentBase
broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_FAMILY

public static java.lang.String COMPONENT_FAMILY

COMPONENT_TYPE

public static java.lang.String COMPONENT_TYPE

RENDERER_TYPE

public static java.lang.String RENDERER_TYPE
Constructor Detail

Pager

public Pager()
Method Detail

getFamily

public java.lang.String getFamily()

getFirstPage

public javax.faces.component.UIComponent getFirstPage()
Return the component that is displayed to navigate to the first page

Returns:
UIComponent

getForComponent

public DataList getForComponent()
Returns the UIComponent that is linked to (or controlled by) the pager

Returns:
a component implementing IPaging

getForComponentId

public java.lang.String getForComponentId()
Returns the id of the component that is linked to (or controlled by) the pager

Returns:
id of the component

getLastPage

public javax.faces.component.UIComponent getLastPage()
Return the component that's displayed to navigate to the last page

Returns:
a UIComponent

getMaximumPageNumbers

public int getMaximumPageNumbers()
Returns the maximum number of pages to display

Returns:
int

getNextPage

public javax.faces.component.UIComponent getNextPage()
Return the component that's displayed to navigate to the next page

Returns:
a UIComponent

getPreviousPage

public javax.faces.component.UIComponent getPreviousPage()
Return the component that's displayed to navigate to the previous page

Returns:
a UIComponent

isFirstLastRendered

public boolean isFirstLastRendered()
Returns the a flag indicating whether the first and last pages are visible or not

Returns:
boolean

isPageNumbersRendered

public boolean isPageNumbersRendered()
Returns the a flag indicating whether page numbers are visible or not

Returns:
boolean

isPreviousNextRendered

public boolean isPreviousNextRendered()
Returns the a flag indicating whether the previous and next pages are visible or not

Returns:
boolean

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)

setFirstLastRendered

public void setFirstLastRendered(boolean firstLastRendered)
Sets the a flag indicating whether the first and last pages are visible or not

Parameters:
firstLastRendered - boolean

setFirstPage

public void setFirstPage(javax.faces.component.UIComponent component)
Sets the UIComponent that is displayed to move to the first record

Parameters:
component - UIComponent

setForComponentId

public void setForComponentId(java.lang.String forComponentId)
Sets the id of the component that is linked-to or controlled by the pager

Parameters:
forComponentId - String

setLastPage

public void setLastPage(javax.faces.component.UIComponent component)
Sets the UIComponent that is displayed to move to the last record

Parameters:
component - UIComponent

setMaximumPageNumbers

public void setMaximumPageNumbers(int maximumPageNumbers)
Sets the maximum number of pages to display

Parameters:
maximumPageNumbers - int

setNextPage

public void setNextPage(javax.faces.component.UIComponent component)
Sets the UIComponent that is displayed to move to the next record

Parameters:
component -

setPageNumbersRendered

public void setPageNumbersRendered(boolean pageNumbersRendered)
Sets the a flag indicating whether page numbers are visible or not

Parameters:
pageNumbersRendered - boolean

setPreviousNextRendered

public void setPreviousNextRendered(boolean previousNextRendered)
Sets the a flag indicating whether the previous and next pages are visible or not

Parameters:
previousNextRendered - boolean

setPreviousPage

public void setPreviousPage(javax.faces.component.UIComponent component)
Sets the UIComponent that is displayed to move to the previous record

Parameters:
component -