Class AbstractUISheet
- java.lang.Object
-
- jakarta.faces.component.UIComponent
-
- jakarta.faces.component.UIComponentBase
-
- jakarta.faces.component.UIData
-
- org.apache.myfaces.tobago.internal.component.AbstractUIData
-
- org.apache.myfaces.tobago.internal.component.AbstractUISheet
-
- All Implemented Interfaces:
jakarta.faces.component.behavior.ClientBehaviorHolder,jakarta.faces.component.NamingContainer,jakarta.faces.component.PartialStateHolder,jakarta.faces.component.StateHolder,jakarta.faces.component.TransientStateHolder,jakarta.faces.component.UniqueIdVendor,jakarta.faces.event.ComponentSystemEventListener,jakarta.faces.event.FacesListener,jakarta.faces.event.SystemEventListenerHolder,EventListener,Visual,SheetStateChangeSource,SortActionSource
- Direct Known Subclasses:
UISheet
public abstract class AbstractUISheet extends AbstractUIData implements SheetStateChangeSource, SortActionSource, jakarta.faces.component.behavior.ClientBehaviorHolder, Visual, jakarta.faces.event.ComponentSystemEventListener
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOMPONENT_TYPEDeprecated.since 4.4.0.static StringNOT_SORTABLE_COL_MESSAGE_IDstatic StringNOT_SORTABLE_MESSAGE_IDstatic StringSORTER_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 Modifier and Type Method Description voidaddStateChangeListener(SheetStateChangeListener listener)voidbroadcast(jakarta.faces.event.FacesEvent facesEvent)voidencodeAll(jakarta.faces.context.FacesContext facesContext)voidencodeBegin(jakarta.faces.context.FacesContext facesContext)List<AbstractUIColumnBase>getAllColumns()MeasureListgetColumnLayout()abstract StringgetColumns()intgetCurrentPage()ExpandedStategetExpandedState()intgetFirstRowIndexOfLastPage()Determines the beginning of the last page in the model.GridgetHeaderGrid()intgetLastRowIndexOfCurrentPage()The rowIndex of the last row on the current page plus one (because of zero based iterating).intgetLazyFirstRow()abstract IntegergetLazyRows()booleangetLazyUpdate()abstract IntegergetMaxSortColumns()intgetPages()The number of pages to render.List<jakarta.faces.component.UIComponent>getRenderedChildrenOf(jakarta.faces.component.UIColumn column)SelectedStategetSelectedState()SheetStategetSheetState(jakarta.faces.context.FacesContext facesContext)abstract ShowPositiongetShowDirectLinks()abstract ShowPositiongetShowPageRange()abstract ShowPositiongetShowRowRange()SheetStategetState()SheetStateChangeListener[]getStateChangeListeners()booleanhasRowCount()voidinit(jakarta.faces.context.FacesContext facesContext)booleanisAtBeginning()booleanisAtEnd()booleanisAutoLayout()abstract booleanisLazy()booleanisPagingVisible()booleanisRendersRowContainer()The value describes, if the UIData renderer creates container elements to hold the row information.abstract booleanisShowDirectLinksArrows()abstract booleanisShowHeader()abstract booleanisShowPageRangeArrows()abstract booleanisShowPagingAlways()booleanneedMoreThanOnePage()voidperformPaging(PageActionEvent pageEvent)voidprocessEvent(jakarta.faces.event.ComponentSystemEvent event)voidprocessUpdates(jakarta.faces.context.FacesContext context)voidqueueEvent(jakarta.faces.event.FacesEvent facesEvent)voidremoveStateChangeListener(SheetStateChangeListener listener)voidrestoreState(jakarta.faces.context.FacesContext context, Object savedState)ObjectsaveState(jakarta.faces.context.FacesContext context)voidsetHeaderGrid(Grid headerGrid)voidsetLazyFirstRow(int lazyFirstRow)voidsetLazyUpdate(boolean lazyUpdate)voidsetState(SheetState state)protected voidsort(jakarta.faces.context.FacesContext facesContext, SortActionEvent event)-
Methods inherited from class org.apache.myfaces.tobago.internal.component.AbstractUIData
createTreeDataModel, findComponent, getDataModel, getPath, getRowClientId, getRowIndicesOfChildren, getRowParentClientId, getSelectable, getSelectableAsEnum, getTreeDataModel, invokeOnComponent, isFolder, isRowsUnlimited, isRowVisible, isShowRoot, isShowRootJunction, isTreeModel, stripRowIndex, visitTree
-
Methods inherited from class jakarta.faces.component.UIData
createUniqueId, encodeEnd, getContainerClientId, getFamily, getFirst, getFooter, getHeader, getRowCount, getRowData, getRowIndex, getRows, getValue, getVar, isRowAvailable, isRowStatePreserved, markInitialState, processDecodes, processValidators, setDataModel, setFirst, setFooter, setHeader, setRowIndex, setRows, setRowStatePreserved, setValue, setValueExpression, setVar
-
Methods inherited from class jakarta.faces.component.UIComponentBase
addClientBehavior, addFacesListener, clearInitialState, decode, encodeChildren, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient
-
Methods inherited from class jakarta.faces.component.UIComponent
getClientId, getCompositeComponentParent, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, pushComponentToEL, restoreTransientState, saveTransientState, 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 jakarta.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_COL_MESSAGE_ID
public static final String NOT_SORTABLE_COL_MESSAGE_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(jakarta.faces.context.FacesContext facesContext) throws IOException- Overrides:
encodeAllin classjakarta.faces.component.UIComponentBase- Throws:
IOException
-
encodeBegin
public void encodeBegin(jakarta.faces.context.FacesContext facesContext) throws IOException- Overrides:
encodeBeginin classAbstractUIData- Throws:
IOException
-
setState
public void setState(SheetState state)
-
getState
public SheetState getState()
-
getSheetState
public SheetState getSheetState(jakarta.faces.context.FacesContext facesContext)
-
getColumns
public abstract String getColumns()
-
processEvent
public void processEvent(jakarta.faces.event.ComponentSystemEvent event) throws jakarta.faces.event.AbortProcessingException- Specified by:
processEventin interfacejakarta.faces.event.ComponentSystemEventListener- Overrides:
processEventin classjakarta.faces.component.UIComponent- Throws:
jakarta.faces.event.AbortProcessingException
-
getColumnLayout
public MeasureList getColumnLayout()
-
isAutoLayout
public boolean isAutoLayout()
-
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).
-
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<jakarta.faces.component.UIComponent> getRenderedChildrenOf(jakarta.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(jakarta.faces.context.FacesContext context)
- Overrides:
processUpdatesin classjakarta.faces.component.UIData
-
saveState
public Object saveState(jakarta.faces.context.FacesContext context)
- Specified by:
saveStatein interfacejakarta.faces.component.StateHolder- Overrides:
saveStatein classjakarta.faces.component.UIData
-
restoreState
public void restoreState(jakarta.faces.context.FacesContext context, Object savedState)- Specified by:
restoreStatein interfacejakarta.faces.component.StateHolder- Overrides:
restoreStatein classjakarta.faces.component.UIData
-
getAllColumns
public List<AbstractUIColumnBase> getAllColumns()
-
queueEvent
public void queueEvent(jakarta.faces.event.FacesEvent facesEvent)
- Overrides:
queueEventin classjakarta.faces.component.UIData
-
broadcast
public void broadcast(jakarta.faces.event.FacesEvent facesEvent) throws jakarta.faces.event.AbortProcessingException- Overrides:
broadcastin classjakarta.faces.component.UIData- Throws:
jakarta.faces.event.AbortProcessingException
-
init
public void init(jakarta.faces.context.FacesContext facesContext)
-
sort
protected void sort(jakarta.faces.context.FacesContext facesContext, SortActionEvent event)
-
addStateChangeListener
public void addStateChangeListener(SheetStateChangeListener listener)
- Specified by:
addStateChangeListenerin interfaceSheetStateChangeSource
-
getStateChangeListeners
public SheetStateChangeListener[] getStateChangeListeners()
- Specified by:
getStateChangeListenersin interfaceSheetStateChangeSource
-
removeStateChangeListener
public void removeStateChangeListener(SheetStateChangeListener listener)
- Specified by:
removeStateChangeListenerin interfaceSheetStateChangeSource
-
performPaging
public void performPaging(PageActionEvent pageEvent)
-
getLazyUpdate
public boolean getLazyUpdate()
-
setLazyUpdate
public void setLazyUpdate(boolean lazyUpdate)
-
getLazyFirstRow
public int getLazyFirstRow()
-
setLazyFirstRow
public void setLazyFirstRow(int lazyFirstRow)
-
isRendersRowContainer
public boolean isRendersRowContainer()
Description copied from class:AbstractUIDataThe 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:
isRendersRowContainerin classAbstractUIData
-
isShowHeader
public abstract boolean isShowHeader()
-
getExpandedState
public ExpandedState getExpandedState()
- Specified by:
getExpandedStatein classAbstractUIData
-
getSelectedState
public SelectedState getSelectedState()
- Specified by:
getSelectedStatein 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()
-
getMaxSortColumns
public abstract Integer getMaxSortColumns()
-
getLazyRows
public abstract Integer getLazyRows()
-
-