org.openfaces.component.table
Class DataTable
java.lang.Object
UIData
org.openfaces.component.OUIData
org.openfaces.component.table.AbstractTable
org.openfaces.component.table.DataTable
- All Implemented Interfaces:
- FilterableComponent, OUIComponent, TableStyles
public class DataTable
- extends AbstractTable
The DataTable component is used to display data in a tabular format and effectively manipulate it.
It supports the features of the JSF HtmlDataTable component and extends the standard functionality
with such advanced features as sorting, row selection (both multiple and single), pagination,
filtering, keyboard navigation, and dynamic data loading (using Ajax.) Plus, the DataTable
component provides special support for handling large datasets with minimal overhead.
Methods inherited from class org.openfaces.component.table.AbstractTable |
getAlign, getAllColumns, getAllRecordsFilterText, getApplyDefaultStyle, getAutoFilterDelay, getBgcolor, getBodyOddRowClass, getBodyOddRowStyle, getBodyRowClass, getBodyRowStyle, getBodySectionClass, getBodySectionStyle, getBorder, getCellpadding, getCellspacing, getClientId, getColumnIdVar, getColumnIndexVar, getColumnReordering, getColumnResizing, getColumnsOrder, getCommonFooterRowClass, getCommonFooterRowStyle, getCommonFooterSeparator, getCommonHeaderRowClass, getCommonHeaderRowStyle, getCommonHeaderSeparator, getDir, getEmptyRecordsFilterText, getFilteredValueByData, getFilters, getFocusedClass, getFocusedStyle, getFooterHorizSeparator, getFooterRowClass, getFooterRowStyle, getFooterSectionClass, getFooterSectionStyle, getFooterVertSeparator, getHeaderHorizSeparator, getHeaderRowClass, getHeaderRowStyle, getHeaderSectionClass, getHeaderSectionStyle, getHeaderVertSeparator, getHorizontalGridLines, getMultiFooterSeparator, getMultiHeaderSeparator, getNoDataMessage, getNoDataMessageAllowed, getNoDataRowClass, getNoDataRowStyle, getNoFilterDataMessage, getNonEmptyRecordsFilterText, getRenderedColumns, getRolloverRowClass, getRolloverRowStyle, getRowIndexByClientSuffix, getRules, getScrolling, getSelection, getSortableHeaderClass, getSortableHeaderRolloverClass, getSortableHeaderRolloverStyle, getSortableHeaderStyle, getSortColumnId, getSortColumnIndex, getSortedAscendingImageUrl, getSortedColumnBodyClass, getSortedColumnBodyStyle, getSortedColumnClass, getSortedColumnFooterClass, getSortedColumnFooterStyle, getSortedColumnHeaderClass, getSortedColumnHeaderStyle, getSortedColumnStyle, getSortedDescendingImageUrl, getSubHeaderRowClass, getSubHeaderRowSeparator, getSubHeaderRowStyle, getTabindex, getTotalRowCount, getUseAjax, getValue, getVerticalGridLines, getWidth, invokeBeforeProcessDecodes, invokeBeforeRenderResponse, isSortAscending, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, setAlign, setAllRecordsFilterText, setApplyDefaultStyle, setAutoFilterDelay, setBgcolor, setBodyOddRowClass, setBodyOddRowStyle, setBodyRowClass, setBodyRowStyle, setBodySectionClass, setBodySectionStyle, setBorder, setCellpadding, setCellspacing, setColumnIdVar, setColumnIndexVar, setColumnsOrder, setCommonFooterRowClass, setCommonFooterRowStyle, setCommonFooterSeparator, setCommonHeaderRowClass, setCommonHeaderRowStyle, setCommonHeaderSeparator, setDir, setEmptyRecordsFilterText, setFocusedClass, setFocusedStyle, setFooterHorizSeparator, setFooterRowClass, setFooterRowStyle, setFooterSectionClass, setFooterSectionStyle, setFooterVertSeparator, setHeaderHorizSeparator, setHeaderRowClass, setHeaderRowStyle, setHeaderSectionClass, setHeaderSectionStyle, setHeaderVertSeparator, setHorizontalGridLines, setId, setMultiFooterSeparator, setMultiHeaderSeparator, setNoDataMessageAllowed, setNoDataRowClass, setNoDataRowStyle, setNonEmptyRecordsFilterText, setParent, setRolloverRowClass, setRolloverRowStyle, setRules, setSelection, setSortableHeaderClass, setSortableHeaderRolloverClass, setSortableHeaderRolloverStyle, setSortableHeaderStyle, setSortAscending, setSortColumnId, setSortColumnIndex, setSortedAscendingImageUrl, setSortedColumnBodyClass, setSortedColumnBodyStyle, setSortedColumnClass, setSortedColumnFooterClass, setSortedColumnFooterStyle, setSortedColumnHeaderClass, setSortedColumnHeaderStyle, setSortedColumnStyle, setSortedDescendingImageUrl, setSubHeaderRowClass, setSubHeaderRowSeparator, setSubHeaderRowStyle, setTabindex, setUseAjax, setValue, setVerticalGridLines, setWidth, toggleSorting, toggleSorting |
Methods inherited from class org.openfaces.component.OUIData |
broadcast, getFirst, getFooter, getHeader, getOnblur, getOnclick, getOncontextmenu, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getRolloverClass, getRolloverStyle, getRowCount, getRowData, getRowIndex, getRows, getStyle, getStyleClass, getUiDataValue, getVar, isRowAvailable, isRowAvailableAfterRestoring, queueEvent, restoreDescendantComponentStates, saveDescendantComponentStates, setFirst, setFooter, setHeader, setOnblur, setOnclick, setOncontextmenu, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setRolloverClass, setRolloverStyle, setRows, setStyle, setStyleClass, setUiDataValue, setVar |
Methods inherited from class java.lang.Object |
equals, 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
DataTable
public DataTable()
getFamily
public java.lang.String getFamily()
- Overrides:
getFamily
in class OUIData
setValueExpression
public void setValueExpression(java.lang.String name,
ValueExpression expression)
- Overrides:
setValueExpression
in class OUIData
saveState
public java.lang.Object saveState(FacesContext facesContext)
- Overrides:
saveState
in class AbstractTable
restoreState
public void restoreState(FacesContext facesContext,
java.lang.Object object)
- Overrides:
restoreState
in class AbstractTable
getPageSize
public int getPageSize()
- Returns:
- Returns the size of a page if the table is being paged and zero if the table is not being paged.
setPageSize
public void setPageSize(int pageSize)
getPageIndex
public int getPageIndex()
setPageIndex
public void setPageIndex(int pageIndex)
getRowIndexVar
public java.lang.String getRowIndexVar()
setRowIndexVar
public void setRowIndexVar(java.lang.String rowIndexVar)
isPaginationKeyboardSupport
public boolean isPaginationKeyboardSupport()
setPaginationKeyboardSupport
public void setPaginationKeyboardSupport(boolean paginationKeyboardSupport)
getPageCount
public int getPageCount()
- Returns:
- the number of pages if pagination is currently enabled. If pagination is disabled (by setting pageSize to 0) or
if the total number of rows is unknown then -1 is returned. Note the that if pagination is enabled then there will
always be at least one page even if there are no rows to show.
getValueExpression
public ValueExpression getValueExpression()
setValueExpression
public void setValueExpression(ValueExpression value)
getPageIndexForRowKey
public int getPageIndexForRowKey(java.lang.Object rowKey)
- Parameters:
rowKey
- row key object for a row whose page index should be detected.
- Returns:
- index of a page where a row with the specified rowKey is displayed, or -1 of no such row is being
displayed.
encodeBegin
public void encodeBegin(FacesContext facesContext)
throws java.io.IOException
- Description copied from class:
OUIData
- Perform necessary actions when rendering of this component starts,
before delegating to the inherited implementation which calls the
associated renderer's encodeBegin method.
- Overrides:
encodeBegin
in class OUIData
- Throws:
java.io.IOException
encodeChildren
public void encodeChildren(FacesContext context)
throws java.io.IOException
- Throws:
java.io.IOException
encodeEnd
public void encodeEnd(FacesContext context)
throws java.io.IOException
- Overrides:
encodeEnd
in class OUIData
- Throws:
java.io.IOException
- See Also:
javax.faces.component.UIComponentBase#encodeEnd(javax.faces.context.FacesContext)
getRowListForFiltering
public java.util.List getRowListForFiltering(Filter filter)
isDataSourceEmpty
public boolean isDataSourceEmpty()
- Specified by:
isDataSourceEmpty
in class AbstractTable
setRowIndex
public void setRowIndex(int rowIndex)
- Description copied from class:
OUIData
- Set the current row index that methods like getRowData use.
Param rowIndex can be -1, meaning "no row".
- Overrides:
setRowIndex
in class OUIData
getCustomDataProviding
public boolean getCustomDataProviding()
setCustomDataProviding
public void setCustomDataProviding(boolean customDataProviding)
filterChanged
public void filterChanged(Filter filter)
- Specified by:
filterChanged
in interface FilterableComponent
- Overrides:
filterChanged
in class AbstractTable
Copyright © 1998-2009 TeamDev Ltd. All Rights Reserved.