| com.sun.rave.web.ui.component.TableRowGroupBase com.sun.rave.web.ui.component.TableRowGroup
TableRowGroup | public class TableRowGroup extends TableRowGroupBase implements NamingContainer(Code) | | Component that represents a group of table rows.
The TableRowGroup component provides a layout mechanism for displaying rows
of data. UI guidelines describe specific behavior that can applied to the
rows and columns of data such as sorting, filtering, pagination, selection,
and custom user actions. In addition, UI guidelines also define sections of
the table that can be used for titles, row group headers, and placement of
pre-defined and user defined actions.
The TableRowGroup component supports a data binding to a collection of data
objects represented by a TableDataProvider instance, which is the
current value of this component itself. During iterative processing over the
rows of data in the data provider, the TableDataProvider for the current row
is exposed as a request attribute under the key specified by the
var property.
Only children of type TableColumn should be processed by renderers associated
with this component.
Note: Column headers and footers are rendered by TableRowGroupRenderer. Table
column footers are rendered by TableRenderer.
Note: To see the messages logged by this class, set the following global
defaults in your JDK's "jre/lib/logging.properties" file.
java.util.logging.ConsoleHandler.level = FINE
com.sun.rave.web.ui.component.TableRowGroup.level = FINE
See TLD docs for more information.
|
Method Summary | |
public void | addSort(SortCriteria criteria) Add a SortCriteria object to sort.
Note: Objects are sorted in the reverse order they were added. | public void | broadcast(FacesEvent event) Override the default UIComponentBase.broadcast() processing to unwrap any
wrapped FacesEvent and reset the current RowKey, before the event is
actually broadcast. | public void | clearFilter() Clear FilterCriteria objects from the TableDataFilter instance used by
this component. | public void | clearSort() Clear SortCriteria objects from the TableDataSorter instance used by this
component. | public void | encodeBegin(FacesContext context) In addition to the default behavior, ensure that any saved per-row state
for our child input components is discarded unless it is needed to
rerender the current page with errors. | public String | getClientId(FacesContext context) Return a client identifier for this component that includes the current
value of the RowKey property, if it is not set to null. | public int | getColumnCount() Get the number of columns found for this component that have a rendered
property of true. | public UIComponent | getEmptyDataColumn() Get empty data column. | public UIComponent | getEmptyDataText() Get empty data text. | public FieldKey | getFieldKey(String fieldId) Get the FieldKey from the underlying TableDataProvider.
Parameters: fieldId - The id of the requested FieldKey. | public RowKey[] | getFilteredRowKeys() Get an array containing filtered RowKey objects.
Note: This filter depends on the FilterCriteria objects provided to the
TableDataFilter instance used by this component. | public int | getFirst() Get the zero-relative row number of the first row to be displayed for
a paginated table.
Note: When ever a new DataProvider is used, UI Guiedlines recommend that
pagination should be reset (e.g., remaining on the 4th page of a new set
of data makes no sense).
Note: If rows have been removed from the table, there is a chance that
the first row could be greater than the total number of rows. | public UIComponent | getGroupFooter() Get group footer. | public UIComponent | getGroupHeader() Get group header. | public RowKey[] | getHiddenRowKeys() Get an array of hidden RowKey objects from the underlying
TableDataProvider taking filtering, sorting, and pagination into account.
Note: The returned RowKey objects depend on the FilterCriteria and
SortCriteria objects provided to the TableDataFilter and TableDataSorter
instances used by this component. | public RowKey[] | getHiddenSelectedRowKeys() Get an array of RowKey objects from the underlying data provider where
the selected property of this component is set to true and the row is
currently hidden from view.
Note: UI guidelines recomend that rows should be unselected when no
longer in view. | public int | getHiddenSelectedRowsCount() Get the number of objects from the underlying data provider where the
selected property of this component is set to true and the row is
currently hidden from view.
Note: UI guidelines recomend that rows should be unselected when no
longer in view. | public int | getLast() Get the zero-relative row number of the last page to be displayed. | public int | getPage() Get current page number to be displayed. | public int | getPages() Get total number of pages to be displayed. | public RowKey[] | getRenderedRowKeys() Get an array of rendered RowKey objects from the underlying
TableDataProvider taking filtering, sorting, and pagination into account.
Note: The returned RowKey objects depend on the FilterCriteria and
SortCriteria objects provided to the TableDataFilter and TableDataSorter
instances used by this component. | public RowKey[] | getRenderedSelectedRowKeys() Get an array of RowKey objects from the underlying data provider where
the selected property of this component is set to true and the row is
rendered.
Note: UI guidelines recomend that rows should be unselected when no
longer in view. | public int | getRenderedSelectedRowsCount() Get the number of objects from the underlying data provider where the
selected property of this component is set to true and the row is
rendered.
Note: UI guidelines recomend that rows should be unselected when no
longer in view. | public int | getRowCount() Get the number of rows in the underlying TableDataProvider. | public RowKey | getRowKey() Get the RowKey associated with the current row. | public RowKey[] | getRowKeys() Get all RowKey objects for the underlying TableDataProvider. | public int | getRows() Get the number of rows to be displayed for a paginated table. | public RowKey[] | getSelectedRowKeys() Get an array of RowKey objects from the underlying data provider where
the selected property of this component is set to true.
Note: The returned RowKey objects depend on the FilterCriteria objects
provided to the TableDataFilter instance used by this component. | public int | getSelectedRowsCount() Get the number of selected rows from the underlying data provider where
the selected property of this component is set to true.
Note: This count depends on the FilterCriteria objects provided to the
TableDataFilter instance used by this component. | public int | getSortCount() Get the number of SortCriteria objects to sort. | public int | getSortLevel(SortCriteria criteria) Get the level of the given SortCriteria object to sort.
Note: The primary sort is level 1, the secondary sort is level 2, the
tertiary sort is level 3, and so on. | public RowKey[] | getSortedRowKeys() Get an array containing sorted RowKey objects.
Note: This sort depends on the SortCriteria objects provided to the
TableDataSorter instance used by this component. | public Table | getTableAncestor() Get the closest Table ancestor that encloses this component. | public Iterator | getTableColumnChildren() Get an Iterator over the TableColumn children found for
this component. | public TableDataFilter | getTableDataFilter() Get the TableDataFilter object used to filter rows. | public TableDataSorter | getTableDataSorter() Get the TableDataSorter object used to sort rows. | protected TableRowDataProvider | getTableRowDataProvider() Get the TableRowDataProvider object representing the data objects that
we will iterate over in this component's rendering. | public Class | getType(FieldKey fieldKey) Get the data type of the data element referenced by the given FieldKey.
Parameters: fieldKey - The FieldKey identifying the data element whose type isto be returned. | public boolean | isDescendingSort(SortCriteria criteria) Test if given SortCriteria object is a descending sort.
Parameters: criteria - The SortCriteria object to sort. | public boolean | isPaginated() Test the paginated state of this component. | public boolean | isRowAvailable() Get the flag indicating whether there is row data available for the
current RowKey. | public void | processDecodes(FacesContext context) Override the default UIComponentBase.processDecodes() processing to
perform the following steps.
- If the rendered property of this UIComponent is false, skip further
processing.
- Set the current RowKey to null.
- Call the processDecodes() method of all facets of this TableRowGroup,
in the order determined by a call to getFacets().keySet().iterator().
- Call the processDecodes() method of all facets of the TableColumn
children of this TableRowGroup.
- Iterate over the set of rows that were included when this component
was rendered (i.e.
| public void | processUpdates(FacesContext context) Override the default UIComponentBase.processUpdates() processing to
perform the following steps.
- If the rendered property of this UIComponent is false, skip further
processing.
- Set the current RowKey to null.
- Call the processUpdates() method of all facets of this TableRowGroup,
in the order determined by a call to getFacets().keySet().iterator().
- Call the processUpdates() method of all facets of the TableColumn
children of this TableRowGroup.
- Iterate over the set of rows that were included when this component
was rendered (i.e.
| public void | processValidators(FacesContext context) Override the default UIComponentBase.processValidators() processing to
perform the following steps.
- If the rendered property of this UIComponent is false, skip further
processing.
- Set the current RowKey to null.
- Call the processValidators() method of all facets of this
TableRowGroup, in the order determined by a call to
getFacets().keySet().iterator().
- Call the processValidators() method of all facets of the TableColumn
children of this TableRowGroup.
- Iterate over the set of rows that were included when this component
was rendered (i.e.
| public void | queueEvent(FacesEvent event) Override the default UIComponentBase.queueEvent() processing to wrap any
queued events in a wrapper so that we can reset the current RowKey in
broadcast(). | public void | restoreState(FacesContext context, Object state) Restore the state of this component. | public Object | saveState(FacesContext context) Save the state of this component. | public void | setFilterCriteria(FilterCriteria[] filterCriteria) Set FilterCriteria objects for the TableDataFilter instance used by this
component. | public void | setFirst(int first) Set the zero-relative row number of the first row to be displayed for
a paginated table. | public void | setPage(int page) A convenience method to set the current page to be displayed.
Note: You can also set the current, first, next, prev, and last pages by
invoking the setFirst(int) method directly. | public void | setPaginated(boolean paginated) Set the paginated state of this component.
Note: When pagination controls are used, a value of true allows both
pagination controls and paginate buttons to be displayed. | public void | setRowKey(RowKey rowKey) Set the RowKey associated with the current row or null for no current row
association.
Note: It is possible to set the RowKey at a value for which the
underlying TableDataProvider does not contain any row data. | public void | setRows(int rows) Set the number of rows to be displayed for a paginated table. | public void | setSortCriteria(SortCriteria[] sortCriteria) Set SortCriteria objects for the TableDataSorter instance used by this
component. | public void | setSourceData(Object sourceData) Set the source data of the TableRowGroup.
Note: When ever a new DataProvider is used, UI Guiedlines recommend that
pagination should be reset (e.g., remaining on the 4th page of a new set
of data makes no sense). | public void | setTableDataFilter(TableDataFilter filter) Set the TableDataFilter object used to filter rows. | public void | setTableDataSorter(TableDataSorter sorter) Set the TableDataSorter object used to sort rows. | public void | setValueBinding(String name, ValueBinding binding) Set the ValueBinding used to calculate the value for the specified
attribute or property name, if any. |
COLUMN_FOOTER_BAR_ID | final public static String COLUMN_FOOTER_BAR_ID(Code) | | The id for the column footer bar.
|
COLUMN_HEADER_BAR_ID | final public static String COLUMN_HEADER_BAR_ID(Code) | | The id for the column header bar.
|
EMPTY_DATA_COLUMN_FACET | final public static String EMPTY_DATA_COLUMN_FACET(Code) | | The facet name for the empty data column.
|
EMPTY_DATA_COLUMN_ID | final public static String EMPTY_DATA_COLUMN_ID(Code) | | The component id for the empty data column.
|
EMPTY_DATA_TEXT_FACET | final public static String EMPTY_DATA_TEXT_FACET(Code) | | The facet name for the empty data text.
|
EMPTY_DATA_TEXT_ID | final public static String EMPTY_DATA_TEXT_ID(Code) | | The component id for the empty data text.
|
FOOTER_FACET | final public static String FOOTER_FACET(Code) | | The facet name for the group footer area.
|
GROUP_FOOTER_BAR_ID | final public static String GROUP_FOOTER_BAR_ID(Code) | | The id for the group footer bar.
|
GROUP_FOOTER_FACET | final public static String GROUP_FOOTER_FACET(Code) | | The facet name for the group footer.
|
GROUP_FOOTER_ID | final public static String GROUP_FOOTER_ID(Code) | | The component id for the group footer.
|
GROUP_HEADER_BAR_ID | final public static String GROUP_HEADER_BAR_ID(Code) | | The id for the table row group header bar.
|
GROUP_HEADER_FACET | final public static String GROUP_HEADER_FACET(Code) | | The facet name for the table row group header.
|
GROUP_HEADER_ID | final public static String GROUP_HEADER_ID(Code) | | The component id for the table row group header.
|
HEADER_FACET | final public static String HEADER_FACET(Code) | | The facet name for the group header area.
|
TABLE_COLUMN_FOOTER_BAR_ID | final public static String TABLE_COLUMN_FOOTER_BAR_ID(Code) | | The id for the table column footers bar.
|
TableRowGroup | public TableRowGroup()(Code) | | Default constructor
|
addSort | public void addSort(SortCriteria criteria)(Code) | | Add a SortCriteria object to sort.
Note: Objects are sorted in the reverse order they were added. For
example, the first object added, will be the last sort applied as the
primary sort. The second object added, will be the second to last sort
applied as the secondary sort. The third object added, will be the third
to last sort applied as the tertiary sort and so on. If an existing
SortCriteria object is found with the same FieldKey, the sort order is
replaced with the new value. Note that sorts are not actually applied
until the getSortedRowKeys() method is invoked, which happens
automatically by the renderer.
Note: This method also resets pagination to the first page per UI
guidelines.
Parameters: criteria - The SortCriteria object to sort. |
broadcast | public void broadcast(FacesEvent event) throws AbortProcessingException(Code) | | Override the default UIComponentBase.broadcast() processing to unwrap any
wrapped FacesEvent and reset the current RowKey, before the event is
actually broadcast. For events that we did not wrap (in queueEvent()),
default processing will occur.
Parameters: event - The FacesEvent to be broadcast. exception: AbortProcessingException - Signal the JavaServer Facesimplementation that no further processing on the current eventshould be performed. exception: IllegalArgumentException - if the implementation classof this FacesEvent is not supported by this component. exception: NullPointerException - if FacesEvent is null. |
clearFilter | public void clearFilter()(Code) | | Clear FilterCriteria objects from the TableDataFilter instance used by
this component.
Note: This method clears the cached filter and sort, then resets
pagination to the first page per UI guidelines.
|
clearSort | public void clearSort()(Code) | | Clear SortCriteria objects from the TableDataSorter instance used by this
component.
Note: This method clears the cached sort, then resets pagination to the
first page per UI guidelines.
|
encodeBegin | public void encodeBegin(FacesContext context) throws IOException(Code) | | In addition to the default behavior, ensure that any saved per-row state
for our child input components is discarded unless it is needed to
rerender the current page with errors.
Parameters: context - FacesContext for the current request. exception: IOException - if an input/output error occurs while rendering. exception: NullPointerException - if FacesContext is null. |
getClientId | public String getClientId(FacesContext context)(Code) | | Return a client identifier for this component that includes the current
value of the RowKey property, if it is not set to null. This implies that
multiple calls to getClientId() may return different results, but ensures
that child components can themselves generate row-specific client
identifiers (since TableRowGroup is a NamingContainer).
exception: NullPointerException - if FacesContext is null. The client id. |
getColumnCount | public int getColumnCount()(Code) | | Get the number of columns found for this component that have a rendered
property of true.
The number of rendered columns. |
getEmptyDataColumn | public UIComponent getEmptyDataColumn()(Code) | | Get empty data column.
The empty data column. |
getEmptyDataText | public UIComponent getEmptyDataText()(Code) | | Get empty data text.
The empty data text. |
getFieldKey | public FieldKey getFieldKey(String fieldId)(Code) | | Get the FieldKey from the underlying TableDataProvider.
Parameters: fieldId - The id of the requested FieldKey. The RowKey from the underlying TableDataProvider. |
getFilteredRowKeys | public RowKey[] getFilteredRowKeys()(Code) | | Get an array containing filtered RowKey objects.
Note: This filter depends on the FilterCriteria objects provided to the
TableDataFilter instance used by this component. Due to filtering, the
size of the returned array may be less than the total number of RowKey
objects for the underlying TableDataProvider.
Note: The returned RowKey objects are cached. If the TableDataFilter
instance used by this component is modified directly, invoke the
clearFilter method to clear the previous filter.
An array containing filtered RowKey objects. |
getFirst | public int getFirst()(Code) | | Get the zero-relative row number of the first row to be displayed for
a paginated table.
Note: When ever a new DataProvider is used, UI Guiedlines recommend that
pagination should be reset (e.g., remaining on the 4th page of a new set
of data makes no sense).
Note: If rows have been removed from the table, there is a chance that
the first row could be greater than the total number of rows. In this
case, the zero-relative row number of the last page to be displayed is
returned.
The zero-relative row number of the first row to be displayed. |
getGroupFooter | public UIComponent getGroupFooter()(Code) | | Get group footer.
The group footer. |
getGroupHeader | public UIComponent getGroupHeader()(Code) | | Get group header.
The group header. |
getHiddenRowKeys | public RowKey[] getHiddenRowKeys()(Code) | | Get an array of hidden RowKey objects from the underlying
TableDataProvider taking filtering, sorting, and pagination into account.
Note: The returned RowKey objects depend on the FilterCriteria and
SortCriteria objects provided to the TableDataFilter and TableDataSorter
instances used by this component. If TableDataFilter and TableDataSorter
are modified directly, invoke the clearSort and clearFilter method to
clear the previous sort and filter.
An array of RowKey objects. |
getHiddenSelectedRowKeys | public RowKey[] getHiddenSelectedRowKeys()(Code) | | Get an array of RowKey objects from the underlying data provider where
the selected property of this component is set to true and the row is
currently hidden from view.
Note: UI guidelines recomend that rows should be unselected when no
longer in view. For example, when a user selects rows of the table and
navigates to another page. Or, when a user applies a filter or sort that
may hide previously selected rows from view. If a user invokes an action
to delete the currently selected rows, they may inadvertently remove rows
not displayed on the current page.
Note: The returned RowKey objects depend on the FilterCriteria and
SortCriteria objects provided to the TableDataFilter and TableDataSorter
instances used by this component. If TableDataFilter and TableDataSorter
are modified directly, invoke the clearSort and clearFilter method to
clear the previous sort and filter.
An array of RowKey objects. |
getHiddenSelectedRowsCount | public int getHiddenSelectedRowsCount()(Code) | | Get the number of objects from the underlying data provider where the
selected property of this component is set to true and the row is
currently hidden from view.
Note: UI guidelines recomend that rows should be unselected when no
longer in view. For example, when a user selects rows of the table and
navigates to another page. Or, when a user applies a filter or sort that
may hide previously selected rows from view. If a user invokes an action
to delete the currently selected rows, they may inadvertently remove rows
not displayed on the current page. That said, there are cases when
maintaining state across table pages is necessary. When maintaining state
and there are currently no hidden selections, UI guidelines recomend that
the number zero should be shown.
Note: This count depends on the FilterCriteria and SortCriteria objects
provided to the TableDataFilter and TableDataSorter instances used by
this component. If TableDataFilter and TableFilterSorter are modified
directly, invoke the clearFilter method to clear the previous filter and
sort.
The number of selected rows currently hidden from view. |
getLast | public int getLast()(Code) | | Get the zero-relative row number of the last page to be displayed.
The zero-relative row number of the last page to be displayed. |
getPage | public int getPage()(Code) | | Get current page number to be displayed.
Note: The default is 1 when the table is not paginated.
The current page number to be displayed. |
getPages | public int getPages()(Code) | | Get total number of pages to be displayed. The default is 1 when the
table is not paginated.
Note: The page count depends on the FilterCriteria objects provided to
the TableDataFilter instance used by this component. Further, the filter
used to obtain the page count is cached. If the TableDataFilter instance
used by this component is to be modified directly, invoke the clearFilter
method to clear the previous filter.
The total number of pages to be displayed. |
getRenderedRowKeys | public RowKey[] getRenderedRowKeys()(Code) | | Get an array of rendered RowKey objects from the underlying
TableDataProvider taking filtering, sorting, and pagination into account.
Note: The returned RowKey objects depend on the FilterCriteria and
SortCriteria objects provided to the TableDataFilter and TableDataSorter
instances used by this component. If TableDataFilter and TableDataSorter
are modified directly, invoke the clearSort and clearFilter method to
clear the previous sort and filter.
An array of RowKey objects. |
getRenderedSelectedRowKeys | public RowKey[] getRenderedSelectedRowKeys()(Code) | | Get an array of RowKey objects from the underlying data provider where
the selected property of this component is set to true and the row is
rendered.
Note: UI guidelines recomend that rows should be unselected when no
longer in view. For example, when a user selects rows of the table and
navigates to another page. Or, when a user applies a filter or sort that
may hide previously selected rows from view. If a user invokes an action
to delete the currently selected rows, they may inadvertently remove rows
not displayed on the current page.
Note: The returned RowKey objects depend on the FilterCriteria and
SortCriteria objects provided to the TableDataFilter and TableDataSorter
instances used by this component. If TableDataFilter and TableDataSorter
are modified directly, invoke the clearSort and clearFilter method to
clear the previous sort and filter.
An array of RowKey objects. |
getRenderedSelectedRowsCount | public int getRenderedSelectedRowsCount()(Code) | | Get the number of objects from the underlying data provider where the
selected property of this component is set to true and the row is
rendered.
Note: UI guidelines recomend that rows should be unselected when no
longer in view. For example, when a user selects rows of the table and
navigates to another page. Or, when a user applies a filter or sort that
may hide previously selected rows from view. If a user invokes an action
to delete the currently selected rows, they may inadvertently remove rows
not displayed on the current page.
Note: This count depends on the FilterCriteria and SortCriteria objects
provided to the TableDataFilter and TableDataSorter instances used by
this component. If TableDataFilter and TableFilterSorter are modified
directly, invoke the clearFilter method to clear the previous filter and
sort.
The number of selected rows currently hidden from view. |
getRowCount | public int getRowCount()(Code) | | Get the number of rows in the underlying TableDataProvider. If the
number of available rows is unknown, -1 is returned.
Note: This row count depends on the FilterCriteria objects provided to
the TableDataFilter instance used by this component. Further, the filter
used to obtain the row count is cached. If the TableDataFilter instance
used by this component is modified directly, invoke the clearFilter
method to clear the previous filter.
The number of rows in the underlying TableDataProvider. |
getRowKey | public RowKey getRowKey()(Code) | | Get the RowKey associated with the current row.
The RowKey associated with the current row. |
getRowKeys | public RowKey[] getRowKeys()(Code) | | Get all RowKey objects for the underlying TableDataProvider.
All RowKey objects for the underlying TableDataProvider. |
getRows | public int getRows()(Code) | | Get the number of rows to be displayed for a paginated table.
Note: UI guidelines recommend a default value of 25 rows per page.
The number of rows to be displayed for a paginated table. |
getSelectedRowKeys | public RowKey[] getSelectedRowKeys()(Code) | | Get an array of RowKey objects from the underlying data provider where
the selected property of this component is set to true.
Note: The returned RowKey objects depend on the FilterCriteria objects
provided to the TableDataFilter instance used by this component. If
TableDataFilter is modified directly, invoke the clearFilter method to
clear the previous filter.
An array of RowKey objects. |
getSelectedRowsCount | public int getSelectedRowsCount()(Code) | | Get the number of selected rows from the underlying data provider where
the selected property of this component is set to true.
Note: This count depends on the FilterCriteria objects provided to the
TableDataFilter instance used by this component. If TableDataFilter is
modified directly, invoke the clearFilter method to clear the previous
filter.
The number of selected rows. |
getSortCount | public int getSortCount()(Code) | | Get the number of SortCriteria objects to sort.
The number of SortCriteria objects to sort. |
getSortLevel | public int getSortLevel(SortCriteria criteria)(Code) | | Get the level of the given SortCriteria object to sort.
Note: The primary sort is level 1, the secondary sort is level 2, the
tertiary sort is level 3, and so on. If the SortCriteria
object was not previously added using the addSort method, the level will
be returned as -1.
Parameters: criteria - The SortCriteria object to sort. The sort level or -1 if the SortCriteria object was not previously added. |
getSortedRowKeys | public RowKey[] getSortedRowKeys()(Code) | | Get an array containing sorted RowKey objects.
Note: This sort depends on the SortCriteria objects provided to the
TableDataSorter instance used by this component. For better performance,
this sort also depends on the FilterCriteria objects provided to the
TableDataFilter instance used by this component. Due to filtering, the
size of the returned array may be less than the total number of RowKey
objects for the underlying TableDataProvider.
Note: The returned RowKey objects are cached. If the TableDataSorter and
TableDataFilter instances used by this component are modified directly,
invoke the clearSort and clearFilter methods to clear the previous sort
and filter.
An array containing sorted RowKey objects. |
getTableAncestor | public Table getTableAncestor()(Code) | | Get the closest Table ancestor that encloses this component.
The Table ancestor. |
getTableColumnChildren | public Iterator getTableColumnChildren()(Code) | | Get an Iterator over the TableColumn children found for
this component.
An Iterator over the TableColumn children. |
getTableDataFilter | public TableDataFilter getTableDataFilter()(Code) | | Get the TableDataFilter object used to filter rows.
The TableDataFilter object used to filter rows. |
getTableDataSorter | public TableDataSorter getTableDataSorter()(Code) | | Get the TableDataSorter object used to sort rows.
The TableDataSorter object used to sort rows. |
getTableRowDataProvider | protected TableRowDataProvider getTableRowDataProvider()(Code) | | Get the TableRowDataProvider object representing the data objects that
we will iterate over in this component's rendering.
The TableRowDataProvider object. |
getType | public Class getType(FieldKey fieldKey)(Code) | | Get the data type of the data element referenced by the given FieldKey.
Parameters: fieldKey - The FieldKey identifying the data element whose type isto be returned. The data type of the data element referenced by the given FieldKey. |
isDescendingSort | public boolean isDescendingSort(SortCriteria criteria)(Code) | | Test if given SortCriteria object is a descending sort.
Parameters: criteria - The SortCriteria object to sort. true if descending, else false. |
isPaginated | public boolean isPaginated()(Code) | | Test the paginated state of this component.
Note: If the paginationControls property of the Table component is true,
this property will be initialized as true.
true for paginate mode, false for scroll mode. |
isRowAvailable | public boolean isRowAvailable()(Code) | | Get the flag indicating whether there is row data available for the
current RowKey. If no row data is available, false is returned.
The flag indicating whether there is row data available. |
processDecodes | public void processDecodes(FacesContext context)(Code) | | Override the default UIComponentBase.processDecodes() processing to
perform the following steps.
- If the rendered property of this UIComponent is false, skip further
processing.
- Set the current RowKey to null.
- Call the processDecodes() method of all facets of this TableRowGroup,
in the order determined by a call to getFacets().keySet().iterator().
- Call the processDecodes() method of all facets of the TableColumn
children of this TableRowGroup.
- Iterate over the set of rows that were included when this component
was rendered (i.e. those defined by the first and rows properties),
performing the following processing for each row:
- Set the current RowKey to the appropriate value for this row.
- If isRowAvailable() returns true, iterate over the children
components of each TableColumn child of this TableRowGroup component,
calling the processDecodes() method for each such child.
- Set the current RowKey to null.
- Call the decode() method of this component.
- If a RuntimeException is thrown during decode processing, call
FacesContext.renderResponse() and re-throw the exception.
Parameters: context - FacesContext for the current request. exception: NullPointerException - if FacesContext is null. |
processUpdates | public void processUpdates(FacesContext context)(Code) | | Override the default UIComponentBase.processUpdates() processing to
perform the following steps.
- If the rendered property of this UIComponent is false, skip further
processing.
- Set the current RowKey to null.
- Call the processUpdates() method of all facets of this TableRowGroup,
in the order determined by a call to getFacets().keySet().iterator().
- Call the processUpdates() method of all facets of the TableColumn
children of this TableRowGroup.
- Iterate over the set of rows that were included when this component
was rendered (i.e. those defined by the first and rows properties),
performing the following processing for each row:
- Set the current RowKey to the appropriate value for this row.
- If isRowAvailable() returns true, iterate over the children
components of each TableColumn child of this TableRowGroup component,
calling the processUpdates() method for each such child.
- Set the current RowKey to null.
Parameters: context - FacesContext for the current request. exception: NullPointerException - if FacesContext is null. |
processValidators | public void processValidators(FacesContext context)(Code) | | Override the default UIComponentBase.processValidators() processing to
perform the following steps.
- If the rendered property of this UIComponent is false, skip further
processing.
- Set the current RowKey to null.
- Call the processValidators() method of all facets of this
TableRowGroup, in the order determined by a call to
getFacets().keySet().iterator().
- Call the processValidators() method of all facets of the TableColumn
children of this TableRowGroup.
- Iterate over the set of rows that were included when this component
was rendered (i.e. those defined by the first and rows properties),
performing the following processing for each row:
- Set the current RowKey to the appropriate value for this row.
- If isRowAvailable() returns true, iterate over the children
components of each TableColumn child of this TableRowGroup component,
calling the processValidators() method for each such child.
- Set the current RowKey to null.
Parameters: context - FacesContext for the current request. exception: NullPointerException - if FacesContext is null. |
queueEvent | public void queueEvent(FacesEvent event)(Code) | | Override the default UIComponentBase.queueEvent() processing to wrap any
queued events in a wrapper so that we can reset the current RowKey in
broadcast().
Parameters: event - FacesEvent to be queued. exception: IllegalStateException - If this component is not a descendantof a UIViewRoot. exception: NullPointerException - If FacesEvent is null. |
restoreState | public void restoreState(FacesContext context, Object state)(Code) | | Restore the state of this component.
|
saveState | public Object saveState(FacesContext context)(Code) | | Save the state of this component.
An array of Object values. |
setFilterCriteria | public void setFilterCriteria(FilterCriteria[] filterCriteria)(Code) | | Set FilterCriteria objects for the TableDataFilter instance used by this
component.
Note: This method clears the cached filter and sort, then resets
pagination to the first page per UI guidelines.
Parameters: filterCriteria - An array of FilterCriteria objects defining thefilter order on this TableDataFilter. |
setFirst | public void setFirst(int first)(Code) | | Set the zero-relative row number of the first row to be displayed for
a paginated table.
Parameters: first - The first row number. exception: IllegalArgumentException - for negative values. |
setPage | public void setPage(int page)(Code) | | A convenience method to set the current page to be displayed.
Note: You can also set the current, first, next, prev, and last pages by
invoking the setFirst(int) method directly. For example, you could use
setFirst(0) to display the first page and setFirst(getLast()) to display
the last page. The setFirst(int) method is particularly useful when a
subset of data is displayed in scroll mode or when overriding pagination.
Note: When ever a new DataProvider is used, UI Guiedlines recommend that
pagination should be reset (e.g., remaining on the 4th page of a new set
of data makes no sense).
Parameters: page - The current page. |
setPaginated | public void setPaginated(boolean paginated)(Code) | | Set the paginated state of this component.
Note: When pagination controls are used, a value of true allows both
pagination controls and paginate buttons to be displayed. A value of
false allows only paginate buttons to be displayed. However, when all
data fits on one page, neither pagination controls or paginate buttons
are displayed.
Note: To properly maintain the paginated state of the table per UI
guidelines, the paginated property is cached. If the paginationControls
property of the table component changes (e.g., in an application builder
environment), use this method to set the paginated property accordingly.
Parameters: paginated - The paginated state of this component. |
setRowKey | public void setRowKey(RowKey rowKey)(Code) | | Set the RowKey associated with the current row or null for no current row
association.
Note: It is possible to set the RowKey at a value for which the
underlying TableDataProvider does not contain any row data. Therefore,
callers may use the isRowAvailable() method to detect whether row data
will be available.
- Save current state information for all descendant components (as
described below).
- Store the new RowKey, and pass it on to the TableDataProvider
associated with this TableRowGroup instance.
- If the new RowKey value is null:
- If the var property is not null,
remove the corresponding request scope attribute (if any).
- Reset the state information for all descendant components
(as described below).
- If the new RowKey value is not null:
- If the var property is not null, expose the
data provider as a request scope attribute whose key is the
var property value.
- Reset the state information for all descendant components
(as described below).
To save current state information for all descendant components,
TableRowGroup must maintain per-row information for each descendant as
follows:
- If the descendant is an instance of EditableValueHolder,
save the state of its localValue property.
- If the descendant is an instance of EditableValueHolder,
save the state of the localValueSet property.
- If the descendant is an instance of EditableValueHolder,
save the state of the valid property.
- If the descendant is an instance of EditableValueHolder,
save the state of the submittedValue property.
To restore current state information for all descendant components,
TableRowGroup must reference its previously stored information
for the current RowKey and call setters for each descendant
as follows:
- If the descendant is an instance of EditableValueHolder,
restore the value property.
- If the descendant is an instance of EditableValueHolder,
restore the state of the localValueSet property.
- If the descendant is an instance of EditableValueHolder,
restore the state of the valid property.
- If the descendant is an instance of EditableValueHolder,
restore the state of the submittedValue property.
Parameters: rowKey - The RowKey associated with the current row ornull for no association. |
setRows | public void setRows(int rows)(Code) | | Set the number of rows to be displayed for a paginated table.
Parameters: rows - The number of rows to be displayed for a paginated table. exception: IllegalArgumentException - for negative values. |
setSortCriteria | public void setSortCriteria(SortCriteria[] sortCriteria)(Code) | | Set SortCriteria objects for the TableDataSorter instance used by this
component.
Note: This method clears the cached sort, then resets pagination to the
first page per UI guidelines.
Parameters: sortCriteria - An array of SortCriteria objects defining the sortorder on this TableDataSorter. |
setSourceData | public void setSourceData(Object sourceData)(Code) | | Set the source data of the TableRowGroup.
Note: When ever a new DataProvider is used, UI Guiedlines recommend that
pagination should be reset (e.g., remaining on the 4th page of a new set
of data makes no sense). However, properties such as the sort and filter
criteria should not automatically be cleared (e.g., there may be
situations where one or both should be left as specified by the user). In
this scenario, pagination is set to the first page.
Parameters: sourceData - The source data of the TableRowGroup. |
setTableDataFilter | public void setTableDataFilter(TableDataFilter filter)(Code) | | Set the TableDataFilter object used to filter rows.
Parameters: filter - The TableDataFilter object used to filter rows. |
setTableDataSorter | public void setTableDataSorter(TableDataSorter sorter)(Code) | | Set the TableDataSorter object used to sort rows.
Parameters: sorter - The TableDataSorter object used to sort rows. |
setValueBinding | public void setValueBinding(String name, ValueBinding binding)(Code) | | Set the ValueBinding used to calculate the value for the specified
attribute or property name, if any. In addition, if a ValueBinding is
set for the value property, remove any synthesized TableDataProvider for
the data previously bound to this component.
Parameters: name - Name of the attribute or property for which to set aValueBinding. Parameters: binding - The ValueBinding to set, or null to remove any currentlyset ValueBinding. exception: IllegalArgumentException - If name is one of sourceVar. exception: NullPointerException - If name is null. |
|
|