Class AbstractUISheet
- java.lang.Object
-
- javax.faces.component.UIComponent
-
- javax.faces.component.UIComponentBase
-
- javax.faces.component.UIData
-
- org.apache.myfaces.tobago.internal.component.AbstractUIData
-
- org.apache.myfaces.tobago.internal.component.AbstractUISheet
-
- All Implemented Interfaces:
EventListener
,javax.faces.component.behavior.ClientBehaviorHolder
,javax.faces.component.NamingContainer
,javax.faces.component.PartialStateHolder
,javax.faces.component.StateHolder
,javax.faces.component.UniqueIdVendor
,javax.faces.event.ComponentSystemEventListener
,javax.faces.event.FacesListener
,javax.faces.event.SystemEventListenerHolder
,Visual
,SheetStateChangeSource
,SortActionSource
- Direct Known Subclasses:
UISheet
public abstract class AbstractUISheet extends AbstractUIData implements SheetStateChangeSource, SortActionSource, javax.faces.component.behavior.ClientBehaviorHolder, Visual, javax.faces.event.ComponentSystemEventListener
-
-
Field Summary
Fields Modifier and Type Field Description static String
COMPONENT_TYPE
Deprecated.since 4.4.0.static String
NOT_SORTABLE_MESSAGE_ID
static String
SORTER_ID
-
Fields inherited from class org.apache.myfaces.tobago.internal.component.AbstractUIData
SUFFIX_EXPANDED, SUFFIX_MARKED, SUFFIX_SELECTED
-
-
Constructor Summary
Constructors Constructor Description AbstractUISheet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addStateChangeListener(SheetStateChangeListener listener)
void
broadcast(javax.faces.event.FacesEvent facesEvent)
void
encodeAll(javax.faces.context.FacesContext facesContext)
void
encodeBegin(javax.faces.context.FacesContext facesContext)
javax.faces.component.UIComponent
findComponent(String searchId)
List<AbstractUIColumnBase>
getAllColumns()
MeasureList
getColumnLayout()
abstract String
getColumns()
int
getCurrentPage()
ExpandedState
getExpandedState()
int
getFirstRowIndexOfLastPage()
Determines the beginning of the last page in the model.Grid
getHeaderGrid()
int
getLast()
Deprecated.since 1.5.5, the name of this method is ambiguous.int
getLastRowIndexOfCurrentPage()
The rowIndex of the last row on the current page plus one (because of zero based iterating).int
getPage()
Deprecated.since 1.5.5, please usegetCurrentPage()
which returns the value zero-based.int
getPages()
The number of pages to render.List<javax.faces.component.UIComponent>
getRenderedChildrenOf(javax.faces.component.UIColumn column)
SelectedState
getSelectedState()
SheetState
getSheetState(javax.faces.context.FacesContext facesContext)
abstract ShowPosition
getShowDirectLinks()
abstract ShowPosition
getShowPageRange()
abstract ShowPosition
getShowRowRange()
SheetState
getState()
SheetStateChangeListener[]
getStateChangeListeners()
boolean
hasRowCount()
void
init(javax.faces.context.FacesContext facesContext)
boolean
isAtBeginning()
boolean
isAtEnd()
boolean
isAutoLayout()
abstract boolean
isLazy()
boolean
isPagingVisible()
boolean
isRendersRowContainer()
The value describes, if the UIData renderer creates container elements to hold the row information.abstract boolean
isShowDirectLinksArrows()
abstract boolean
isShowHeader()
abstract boolean
isShowPageRangeArrows()
abstract boolean
isShowPagingAlways()
boolean
needMoreThanOnePage()
void
performPaging(PageActionEvent pageEvent)
void
processEvent(javax.faces.event.ComponentSystemEvent event)
void
processUpdates(javax.faces.context.FacesContext context)
void
queueEvent(javax.faces.event.FacesEvent facesEvent)
void
removeStateChangeListener(SheetStateChangeListener listener)
void
restoreState(javax.faces.context.FacesContext context, Object savedState)
Object
saveState(javax.faces.context.FacesContext context)
void
setHeaderGrid(Grid headerGrid)
void
setState(SheetState state)
protected void
sort(javax.faces.context.FacesContext facesContext, SortActionEvent event)
String
stripRowIndex(String initialSearchId)
-
Methods inherited from class org.apache.myfaces.tobago.internal.component.AbstractUIData
createTreeDataModel, getDataModel, getPath, getRowClientId, getRowIndicesOfChildren, getRowParentClientId, getSelectable, getSelectableAsEnum, getTreeDataModel, invokeOnComponent, isFolder, isRowsUnlimited, isRowVisible, isShowRoot, isShowRootJunction, isTreeModel, visitTree
-
Methods inherited from class javax.faces.component.UIData
createUniqueId, encodeEnd, getContainerClientId, getFamily, getFirst, getFooter, getHeader, getRowCount, getRowData, getRowIndex, getRows, getValue, getVar, isRowAvailable, processDecodes, processValidators, setDataModel, setFirst, setFooter, setHeader, setRowIndex, setRows, setValue, setValueExpression, setVar
-
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, addFacesListener, clearInitialState, decode, encodeChildren, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
-
Methods inherited from class javax.faces.component.UIComponent
getClientId, getCompositeComponentParent, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, isCompositeComponent, isInView, isVisitable, popComponentFromEL, pushComponentToEL, setInView, subscribeToEvent, unsubscribeFromEvent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.faces.component.behavior.ClientBehaviorHolder
addClientBehavior, getClientBehaviors, getDefaultEventName, getEventNames
-
Methods inherited from interface org.apache.myfaces.tobago.event.SheetStateChangeSource
getStateChangeListenerExpression, setStateChangeListenerExpression
-
Methods inherited from interface org.apache.myfaces.tobago.event.SortActionSource
getSortActionListenerExpression, setSortActionListenerExpression
-
Methods inherited from interface org.apache.myfaces.tobago.component.Visual
getCustomClass, getMarkup, getRendererType, isPlain, setCustomClass, setMarkup
-
-
-
-
Field Detail
-
COMPONENT_TYPE
@Deprecated public static final String COMPONENT_TYPE
Deprecated.since 4.4.0.- See Also:
- Constant Field Values
-
SORTER_ID
public static final String SORTER_ID
- See Also:
- Constant Field Values
-
NOT_SORTABLE_MESSAGE_ID
public static final String NOT_SORTABLE_MESSAGE_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
encodeAll
public void encodeAll(javax.faces.context.FacesContext facesContext) throws IOException
- Overrides:
encodeAll
in classjavax.faces.component.UIComponentBase
- Throws:
IOException
-
encodeBegin
public void encodeBegin(javax.faces.context.FacesContext facesContext) throws IOException
- Overrides:
encodeBegin
in classAbstractUIData
- Throws:
IOException
-
setState
public void setState(SheetState state)
-
getState
public SheetState getState()
-
getSheetState
public SheetState getSheetState(javax.faces.context.FacesContext facesContext)
-
getColumns
public abstract String getColumns()
-
processEvent
public void processEvent(javax.faces.event.ComponentSystemEvent event) throws javax.faces.event.AbortProcessingException
- Specified by:
processEvent
in interfacejavax.faces.event.ComponentSystemEventListener
- Overrides:
processEvent
in classjavax.faces.component.UIComponent
- Throws:
javax.faces.event.AbortProcessingException
-
getColumnLayout
public MeasureList getColumnLayout()
-
isAutoLayout
public boolean isAutoLayout()
-
getLast
@Deprecated public int getLast()
Deprecated.since 1.5.5, the name of this method is ambiguous. You may usegetLastRowIndexOfCurrentPage()
.
-
getLastRowIndexOfCurrentPage
public int getLastRowIndexOfCurrentPage()
The rowIndex of the last row on the current page plus one (because of zero based iterating).- Throws:
IllegalArgumentException
- If the number of rows in the model returned byUIData.getRowCount()
is -1 (undefined).
-
getCurrentPage
public int getCurrentPage()
- Returns:
- returns the current page (based by 0).
-
getPage
@Deprecated public int getPage()
Deprecated.since 1.5.5, please usegetCurrentPage()
which returns the value zero-based.- Returns:
- returns the current page (based by 1).
-
getPages
public int getPages()
The number of pages to render.- Throws:
IllegalArgumentException
- If the number of rows in the model returned byUIData.getRowCount()
is -1 (undefined).
-
getRenderedChildrenOf
public List<javax.faces.component.UIComponent> getRenderedChildrenOf(javax.faces.component.UIColumn column)
-
isAtBeginning
public boolean isAtBeginning()
- Returns:
- Is the interval to display starting with the first row?
-
hasRowCount
public boolean hasRowCount()
- Returns:
- Does the data model knows the number of rows?
-
isPagingVisible
public boolean isPagingVisible()
- Returns:
- Should the paging controls be rendered? Either because of the need of paging or because the show is
enforced by
isShowPagingAlways()
-
needMoreThanOnePage
public boolean needMoreThanOnePage()
- Returns:
- Is panging needed to display all rows? If the number of rows is unknown this method returns true.
-
isShowPagingAlways
public abstract boolean isShowPagingAlways()
-
isAtEnd
public boolean isAtEnd()
-
getFirstRowIndexOfLastPage
public int getFirstRowIndexOfLastPage()
Determines the beginning of the last page in the model. If the number of rows to display on one page is unlimited, the value is 0 (there is only one page).- Returns:
- The index of the first row of the last paging page.
- Throws:
IllegalArgumentException
- If the number of rows in the model returned byUIData.getRowCount()
is -1 (undefined).
-
processUpdates
public void processUpdates(javax.faces.context.FacesContext context)
- Overrides:
processUpdates
in classjavax.faces.component.UIData
-
saveState
public Object saveState(javax.faces.context.FacesContext context)
- Specified by:
saveState
in interfacejavax.faces.component.StateHolder
- Overrides:
saveState
in classjavax.faces.component.UIComponentBase
-
restoreState
public void restoreState(javax.faces.context.FacesContext context, Object savedState)
- Specified by:
restoreState
in interfacejavax.faces.component.StateHolder
- Overrides:
restoreState
in classjavax.faces.component.UIComponentBase
-
getAllColumns
public List<AbstractUIColumnBase> getAllColumns()
-
queueEvent
public void queueEvent(javax.faces.event.FacesEvent facesEvent)
- Overrides:
queueEvent
in classjavax.faces.component.UIData
-
broadcast
public void broadcast(javax.faces.event.FacesEvent facesEvent) throws javax.faces.event.AbortProcessingException
- Overrides:
broadcast
in classjavax.faces.component.UIData
- Throws:
javax.faces.event.AbortProcessingException
-
init
public void init(javax.faces.context.FacesContext facesContext)
-
sort
protected void sort(javax.faces.context.FacesContext facesContext, SortActionEvent event)
-
addStateChangeListener
public void addStateChangeListener(SheetStateChangeListener listener)
- Specified by:
addStateChangeListener
in interfaceSheetStateChangeSource
-
getStateChangeListeners
public SheetStateChangeListener[] getStateChangeListeners()
- Specified by:
getStateChangeListeners
in interfaceSheetStateChangeSource
-
removeStateChangeListener
public void removeStateChangeListener(SheetStateChangeListener listener)
- Specified by:
removeStateChangeListener
in interfaceSheetStateChangeSource
-
findComponent
public javax.faces.component.UIComponent findComponent(String searchId)
- Overrides:
findComponent
in classjavax.faces.component.UIComponentBase
-
performPaging
public void performPaging(PageActionEvent pageEvent)
-
isRendersRowContainer
public boolean isRendersRowContainer()
Description copied from class:AbstractUIData
The value describes, if the UIData renderer creates container elements to hold the row information. This information is important for the TreeNodeRenderer to set the visible state in the output or not. Typically the Sheet returns true and a Tree returns false, because the sheet renders the HTML TR tags, the the sheet also is responsible for the visible state.- Overrides:
isRendersRowContainer
in classAbstractUIData
-
isShowHeader
public abstract boolean isShowHeader()
-
getExpandedState
public ExpandedState getExpandedState()
- Specified by:
getExpandedState
in classAbstractUIData
-
getSelectedState
public SelectedState getSelectedState()
- Specified by:
getSelectedState
in classAbstractUIData
-
getHeaderGrid
public Grid getHeaderGrid()
-
setHeaderGrid
public void setHeaderGrid(Grid headerGrid)
-
isShowDirectLinksArrows
public abstract boolean isShowDirectLinksArrows()
-
isShowPageRangeArrows
public abstract boolean isShowPageRangeArrows()
-
getShowRowRange
public abstract ShowPosition getShowRowRange()
-
getShowPageRange
public abstract ShowPosition getShowPageRange()
-
getShowDirectLinks
public abstract ShowPosition getShowDirectLinks()
-
isLazy
public abstract boolean isLazy()
-
-