org.apache.myfaces.custom.datascroller
Class HtmlDataScroller
java.lang.Object
javax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIPanel
javax.faces.component.html.HtmlPanelGroup
org.apache.myfaces.component.html.ext.HtmlPanelGroup
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 $)
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 |
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 |
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
HtmlDataScroller
public HtmlDataScroller()
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:
- if the user selected an absolute page# then setFirst is called with
uiData.getRows() * pageNumber.
- if the user selected the "first page" option then setFirst(0) is called.
- if the user selected the "previous page" option then setFirst is decremented
by uiData.getRows().
- if the user selected the "fast rewind" option then setFirst is decremented
by uiData.getRows() * fastStep.
- next, fast-forward and last options have the obvious effect.
- 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.