org.apache.myfaces.custom.datascroller
Class HtmlDataScroller

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIPanel
              extended by javax.faces.component.html.HtmlPanelGroup
                  extended by org.apache.myfaces.component.html.ext.HtmlPanelGroup
                      extended by org.apache.myfaces.custom.datascroller.HtmlDataScroller
All Implemented Interfaces:
javax.faces.component.ActionSource, javax.faces.component.StateHolder, UserRoleAware, org.apache.myfaces.shared_tomahawk.component.DisplayValueOnlyCapable

public class HtmlDataScroller
extends HtmlPanelGroup
implements javax.faces.component.ActionSource

A component which works together with a UIData component to allow a user to view a large list of data one "page" at a time, and navigate between pages.

Version:
$Revision: 472630 $ $Date: 2006-11-08 21:40:03 +0100 (Mi, 08 Nov 2006) $
Author:
Thomas Spiegl (latest modification by $Author: grantsmith $)

Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static java.lang.String FACET_FAST_FORWARD
           
static java.lang.String FACET_FAST_REWIND
           
static java.lang.String FACET_FIRST
           
static java.lang.String FACET_LAST
           
static java.lang.String FACET_NEXT
           
static java.lang.String FACET_PREVIOUS
           
 
Fields inherited from class org.apache.myfaces.component.html.ext.HtmlPanelGroup
BLOCK_LAYOUT, DEFAULT_COLSPAN
 
Fields inherited from interface org.apache.myfaces.component.UserRoleAware
ENABLED_ON_USER_ROLE_ATTR, VISIBLE_ON_USER_ROLE_ATTR
 
Fields inherited from interface org.apache.myfaces.shared_tomahawk.component.DisplayValueOnlyCapable
DISPLAY_VALUE_ONLY_ATTR, DISPLAY_VALUE_ONLY_STYLE_ATTR, DISPLAY_VALUE_ONLY_STYLE_CLASS_ATTR
 
Constructor Summary
HtmlDataScroller()
           
 
Method Summary
 void addActionListener(javax.faces.event.ActionListener listener)
           
 void broadcast(javax.faces.event.FacesEvent event)
          Invoke any action listeners attached to this class.
protected  void broadcastToActionListener(ScrollerActionEvent event)
           
protected  javax.faces.component.UIData findUIData()
          Find the UIData component associated with this scroller.
 javax.faces.el.MethodBinding getAction()
           
 javax.faces.el.MethodBinding getActionListener()
           
 javax.faces.event.ActionListener[] getActionListeners()
           
 java.lang.String getDisplayedRowsCountVar()
           
 java.lang.String getFamily()
           
 javax.faces.component.UIComponent getFastForward()
           
 java.lang.String getFastfStyleClass()
           
 javax.faces.component.UIComponent getFastRewind()
           
 java.lang.String getFastrStyleClass()
           
 int getFastStep()
           
 javax.faces.component.UIComponent getFirst()
           
 int getFirstRow()
           
 java.lang.String getFirstRowIndexVar()
           
 java.lang.String getFirstStyleClass()
           
 java.lang.String getFor()
           
 javax.faces.component.UIComponent getLast()
           
 java.lang.String getLastRowIndexVar()
           
 java.lang.String getLastStyleClass()
           
 javax.faces.component.UIComponent getNext()
           
 java.lang.String getNextStyleClass()
           
 java.lang.String getOnclick()
           
 java.lang.String getOndblclick()
           
 int getPageCount()
           
 java.lang.String getPageCountVar()
           
 int getPageIndex()
           
 java.lang.String getPageIndexVar()
           
 java.lang.String getPaginatorActiveColumnClass()
           
 java.lang.String getPaginatorActiveColumnStyle()
           
 java.lang.String getPaginatorColumnClass()
           
 java.lang.String getPaginatorColumnStyle()
           
 int getPaginatorMaxPages()
           
 java.lang.String getPaginatorTableClass()
           
 java.lang.String getPaginatorTableStyle()
           
 javax.faces.component.UIComponent getPrevious()
           
 java.lang.String getPreviousStyleClass()
           
 boolean getRendersChildren()
           
 int getRowCount()
           
 int getRows()
           
 java.lang.String getRowsCountVar()
           
 java.lang.String getStyle()
           
 java.lang.String getStyleClass()
           
 javax.faces.component.UIData getUIData()
           
 boolean isImmediate()
           
 boolean isListLayout()
           
 boolean isPaginator()
           
 boolean isPaginatorRenderLinkForActive()
           
 boolean isRenderFacetsIfSinglePage()
           
 boolean isSingleElementLayout()
           
 void queueEvent(javax.faces.event.FacesEvent event)
          Catch any attempts to queue events for this component, and ensure the event's phase is set appropriately.
 void removeActionListener(javax.faces.event.ActionListener listener)
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setAction(javax.faces.el.MethodBinding action)
           
 void setActionListener(javax.faces.el.MethodBinding actionListener)
           
 void setDisplayedRowsCountVar(java.lang.String displayedRowsCountVar)
           
 void setFastForward(javax.faces.component.UIComponent previous)
           
 void setFastfStyleClass(java.lang.String fastfStyleClass)
           
 void setFastRewind(javax.faces.component.UIComponent previous)
           
 void setFastrStyleClass(java.lang.String fastrStyleClass)
           
 void setFastStep(int fastStep)
           
 void setFirst(javax.faces.component.UIComponent first)
           
protected  void setFirst(javax.faces.component.UIData uiData, int value)
           
 void setFirstRowIndexVar(java.lang.String firstRowIndexVar)
           
 void setFirstStyleClass(java.lang.String firstStyleClass)
           
 void setFor(java.lang.String forValue)
           
 void setImmediate(boolean immediate)
           
 void setLast(javax.faces.component.UIComponent last)
           
 void setLastRowIndexVar(java.lang.String lastRowIndexVar)
           
 void setLastStyleClass(java.lang.String lastStyleClass)
           
 void setNext(javax.faces.component.UIComponent next)
           
 void setNextStyleClass(java.lang.String nextStyleClass)
           
 void setOnclick(java.lang.String onclick)
           
 void setOndblclick(java.lang.String ondblclick)
           
 void setPageCountVar(java.lang.String pageCountVar)
           
 void setPageIndexVar(java.lang.String pageIndexVar)
           
 void setPaginator(boolean paginator)
           
 void setPaginatorActiveColumnClass(java.lang.String paginatorActiveColumnClass)
           
 void setPaginatorActiveColumnStyle(java.lang.String paginatorActiveColumnStyle)
           
 void setPaginatorColumnClass(java.lang.String paginatorColumnClass)
           
 void setPaginatorColumnStyle(java.lang.String paginatorColumnStyle)
           
 void setPaginatorMaxPages(int paginatorMaxPages)
           
 void setPaginatorRenderLinkForActive(boolean paginatorRenderLinkForActive)
           
 void setPaginatorTableClass(java.lang.String paginatorTableClass)
           
 void setPaginatorTableStyle(java.lang.String paginatorTableStyle)
           
 void setPrevious(javax.faces.component.UIComponent previous)
           
 void setPreviousStyleClass(java.lang.String previousStyleClass)
           
 void setRenderFacetsIfSinglePage(boolean renderFacetsIfSinglePage)
           
 void setRowsCountVar(java.lang.String rowsCountVar)
           
 void setStyle(java.lang.String style)
           
 void setStyleClass(java.lang.String styleClass)
           
 
Methods inherited from class org.apache.myfaces.component.html.ext.HtmlPanelGroup
getClientId, getColspan, getDisplayValueOnlyStyle, getDisplayValueOnlyStyleClass, getEnabledOnUserRole, getLayout, getVisibleOnUserRole, isDisplayValueOnly, isRendered, isSetDisplayValueOnly, setColspan, setDisplayValueOnly, setDisplayValueOnlyStyle, setDisplayValueOnlyStyleClass, setEnabledOnUserRole, setLayout, setVisibleOnUserRole
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getValueBinding, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values

FACET_FIRST

public static final java.lang.String FACET_FIRST

FACET_PREVIOUS

public static final java.lang.String FACET_PREVIOUS

FACET_NEXT

public static final java.lang.String FACET_NEXT

FACET_LAST

public static final java.lang.String FACET_LAST

FACET_FAST_FORWARD

public static final java.lang.String FACET_FAST_FORWARD

FACET_FAST_REWIND

public static final java.lang.String FACET_FAST_REWIND
Constructor Detail

HtmlDataScroller

public HtmlDataScroller()
Method Detail

isListLayout

public boolean isListLayout()

isSingleElementLayout

public boolean isSingleElementLayout()

queueEvent

public void queueEvent(javax.faces.event.FacesEvent event)
Catch any attempts to queue events for this component, and ensure the event's phase is set appropriately. Events are expected to be queued by this component's renderer.

When this component is marked "immediate", any ActionEvent will be marked to fire in the "apply request values" phase. When this component is not immediate the event will fire during the "invoke application" phase instead.

Overrides:
queueEvent in class javax.faces.component.UIComponentBase

broadcast

public void broadcast(javax.faces.event.FacesEvent event)
               throws javax.faces.event.AbortProcessingException
Invoke any action listeners attached to this class.

After listener invocation, the associated UIData's properties get updated:

Overrides:
broadcast in class javax.faces.component.UIComponentBase
Throws:
javax.faces.event.AbortProcessingException

setFirst

protected void setFirst(javax.faces.component.UIData uiData,
                        int value)

broadcastToActionListener

protected void broadcastToActionListener(ScrollerActionEvent event)
Parameters:
event -

getUIData

public javax.faces.component.UIData getUIData()
Returns:
int

getPageIndex

public int getPageIndex()
Returns:
the page index of the uidata

getPageCount

public int getPageCount()
Returns:
the page count of the uidata

getRowCount

public int getRowCount()
Returns:
int

getRows

public int getRows()
Returns:
int

getFirstRow

public int getFirstRow()
Returns:
int

findUIData

protected javax.faces.component.UIData findUIData()
Find the UIData component associated with this scroller.

If the "for" attribute is not null then that value is used to find the specified component by id. Both "relative" and "absolute" ids are allowed; see method UIComponent.findComponent for details.

If the "for" attribute is not defined, then this component is expected to be a child of a UIData component.

Throws:
java.lang.IllegalArgumentException - if an associated UIData component cannot be found.

setFirst

public void setFirst(javax.faces.component.UIComponent first)

getFirst

public javax.faces.component.UIComponent getFirst()

setLast

public void setLast(javax.faces.component.UIComponent last)

getLast

public javax.faces.component.UIComponent getLast()

setNext

public void setNext(javax.faces.component.UIComponent next)

getNext

public javax.faces.component.UIComponent getNext()

setFastForward

public void setFastForward(javax.faces.component.UIComponent previous)

getFastForward

public javax.faces.component.UIComponent getFastForward()

setFastRewind

public void setFastRewind(javax.faces.component.UIComponent previous)

getFastRewind

public javax.faces.component.UIComponent getFastRewind()

setPrevious

public void setPrevious(javax.faces.component.UIComponent previous)

getPrevious

public javax.faces.component.UIComponent getPrevious()

getRendersChildren

public boolean getRendersChildren()
Overrides:
getRendersChildren in class javax.faces.component.UIComponentBase

getAction

public javax.faces.el.MethodBinding getAction()
Specified by:
getAction in interface javax.faces.component.ActionSource
See Also:
ActionSource.getAction()

setAction

public void setAction(javax.faces.el.MethodBinding action)
Specified by:
setAction in interface javax.faces.component.ActionSource
See Also:
ActionSource.setAction(javax.faces.el.MethodBinding)

setActionListener

public void setActionListener(javax.faces.el.MethodBinding actionListener)
Specified by:
setActionListener in interface javax.faces.component.ActionSource
See Also:
ActionSource.setActionListener(javax.faces.el.MethodBinding)

getActionListener

public javax.faces.el.MethodBinding getActionListener()
Specified by:
getActionListener in interface javax.faces.component.ActionSource
See Also:
ActionSource.getActionListener()

addActionListener

public void addActionListener(javax.faces.event.ActionListener listener)
Specified by:
addActionListener in interface javax.faces.component.ActionSource
See Also:
ActionSource.addActionListener(javax.faces.event.ActionListener)

getActionListeners

public javax.faces.event.ActionListener[] getActionListeners()
Specified by:
getActionListeners in interface javax.faces.component.ActionSource
See Also:
ActionSource.getActionListeners()

removeActionListener

public void removeActionListener(javax.faces.event.ActionListener listener)
Specified by:
removeActionListener in interface javax.faces.component.ActionSource
See Also:
ActionSource.removeActionListener(javax.faces.event.ActionListener)

getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class javax.faces.component.UIPanel

setFor

public void setFor(java.lang.String forValue)

getFor

public java.lang.String getFor()

setFastStep

public void setFastStep(int fastStep)

getFastStep

public int getFastStep()

setPageIndexVar

public void setPageIndexVar(java.lang.String pageIndexVar)

getPageIndexVar

public java.lang.String getPageIndexVar()

setPageCountVar

public void setPageCountVar(java.lang.String pageCountVar)

getPageCountVar

public java.lang.String getPageCountVar()

setRowsCountVar

public void setRowsCountVar(java.lang.String rowsCountVar)

getRowsCountVar

public java.lang.String getRowsCountVar()

setDisplayedRowsCountVar

public void setDisplayedRowsCountVar(java.lang.String displayedRowsCountVar)

getDisplayedRowsCountVar

public java.lang.String getDisplayedRowsCountVar()

setFirstRowIndexVar

public void setFirstRowIndexVar(java.lang.String firstRowIndexVar)

getFirstRowIndexVar

public java.lang.String getFirstRowIndexVar()

setLastRowIndexVar

public void setLastRowIndexVar(java.lang.String lastRowIndexVar)

getLastRowIndexVar

public java.lang.String getLastRowIndexVar()

setStyle

public void setStyle(java.lang.String style)
Overrides:
setStyle in class javax.faces.component.html.HtmlPanelGroup

getStyle

public java.lang.String getStyle()
Overrides:
getStyle in class javax.faces.component.html.HtmlPanelGroup

setStyleClass

public void setStyleClass(java.lang.String styleClass)
Overrides:
setStyleClass in class javax.faces.component.html.HtmlPanelGroup

getStyleClass

public java.lang.String getStyleClass()
Overrides:
getStyleClass in class javax.faces.component.html.HtmlPanelGroup

setPaginator

public void setPaginator(boolean paginator)

isPaginator

public boolean isPaginator()

setPaginatorMaxPages

public void setPaginatorMaxPages(int paginatorMaxPages)

getPaginatorMaxPages

public int getPaginatorMaxPages()

setPaginatorTableClass

public void setPaginatorTableClass(java.lang.String paginatorTableClass)

getPaginatorTableClass

public java.lang.String getPaginatorTableClass()

setPaginatorTableStyle

public void setPaginatorTableStyle(java.lang.String paginatorTableStyle)

getPaginatorTableStyle

public java.lang.String getPaginatorTableStyle()

setPaginatorColumnClass

public void setPaginatorColumnClass(java.lang.String paginatorColumnClass)

getPaginatorColumnClass

public java.lang.String getPaginatorColumnClass()

setPaginatorColumnStyle

public void setPaginatorColumnStyle(java.lang.String paginatorColumnStyle)

getPaginatorColumnStyle

public java.lang.String getPaginatorColumnStyle()

setPaginatorActiveColumnClass

public void setPaginatorActiveColumnClass(java.lang.String paginatorActiveColumnClass)

getPaginatorActiveColumnClass

public java.lang.String getPaginatorActiveColumnClass()

setPaginatorRenderLinkForActive

public void setPaginatorRenderLinkForActive(boolean paginatorRenderLinkForActive)

isPaginatorRenderLinkForActive

public boolean isPaginatorRenderLinkForActive()

setFirstStyleClass

public void setFirstStyleClass(java.lang.String firstStyleClass)

getFirstStyleClass

public java.lang.String getFirstStyleClass()

setLastStyleClass

public void setLastStyleClass(java.lang.String lastStyleClass)

getLastStyleClass

public java.lang.String getLastStyleClass()

setPreviousStyleClass

public void setPreviousStyleClass(java.lang.String previousStyleClass)

getPreviousStyleClass

public java.lang.String getPreviousStyleClass()

setNextStyleClass

public void setNextStyleClass(java.lang.String nextStyleClass)

getNextStyleClass

public java.lang.String getNextStyleClass()

setFastfStyleClass

public void setFastfStyleClass(java.lang.String fastfStyleClass)

getFastfStyleClass

public java.lang.String getFastfStyleClass()

setFastrStyleClass

public void setFastrStyleClass(java.lang.String fastrStyleClass)

getFastrStyleClass

public java.lang.String getFastrStyleClass()

setPaginatorActiveColumnStyle

public void setPaginatorActiveColumnStyle(java.lang.String paginatorActiveColumnStyle)

getPaginatorActiveColumnStyle

public java.lang.String getPaginatorActiveColumnStyle()

setRenderFacetsIfSinglePage

public void setRenderFacetsIfSinglePage(boolean renderFacetsIfSinglePage)

isRenderFacetsIfSinglePage

public boolean isRenderFacetsIfSinglePage()

setImmediate

public void setImmediate(boolean immediate)
Specified by:
setImmediate in interface javax.faces.component.ActionSource

isImmediate

public boolean isImmediate()
Specified by:
isImmediate in interface javax.faces.component.ActionSource

setOnclick

public void setOnclick(java.lang.String onclick)

getOnclick

public java.lang.String getOnclick()

setOndblclick

public void setOndblclick(java.lang.String ondblclick)

getOndblclick

public java.lang.String getOndblclick()

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class HtmlPanelGroup

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class HtmlPanelGroup


Copyright © 2011. All Rights Reserved.