|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
com.sun.webui.jsf.component.WebuiComponent
com.sun.webui.jsf.component.TableRowGroupBase
com.sun.webui.jsf.component.TableRowGroup
public class TableRowGroup
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.web.ui.component.TableRowGroup.level = FINE
See TLD docs for more information.
Field Summary | |
---|---|
static java.lang.String |
COLUMN_FOOTER_BAR_ID
The id for the column footer bar. |
static java.lang.String |
COLUMN_HEADER_BAR_ID
The id for the column header bar. |
static java.lang.String |
EMPTY_DATA_COLUMN_FACET
The facet name for the empty data column. |
static java.lang.String |
EMPTY_DATA_COLUMN_ID
The component id for the empty data column. |
static java.lang.String |
EMPTY_DATA_TEXT_FACET
The facet name for the empty data text. |
static java.lang.String |
EMPTY_DATA_TEXT_ID
The component id for the empty data text. |
static java.lang.String |
FOOTER_FACET
The facet name for the group footer area. |
static java.lang.String |
GROUP_FOOTER_BAR_ID
The id for the group footer bar. |
static java.lang.String |
GROUP_FOOTER_FACET
The facet name for the group footer. |
static java.lang.String |
GROUP_FOOTER_ID
The component id for the group footer. |
static java.lang.String |
GROUP_HEADER_BAR_ID
The id for the table row group header bar. |
static java.lang.String |
GROUP_HEADER_FACET
The facet name for the table row group header. |
static java.lang.String |
GROUP_HEADER_ID
The component id for the table row group header. |
static java.lang.String |
HEADER_FACET
The facet name for the group header area. |
static java.lang.String |
TABLE_COLUMN_FOOTER_BAR_ID
The id for the table column footers bar. |
Fields inherited from interface javax.faces.component.NamingContainer |
---|
SEPARATOR_CHAR |
Constructor Summary | |
---|---|
TableRowGroup()
Default constructor |
Method Summary | |
---|---|
void |
clear()
Clear cached properties. |
int |
getColumnCount()
Get the number of columns found for this component that have a rendered property of true. |
javax.faces.component.UIComponent |
getEmptyDataColumn()
Get empty data column. |
javax.faces.component.UIComponent |
getEmptyDataText()
Get empty data text. |
java.lang.String |
getExtraFooterHtml()
Extra HTML code to be appended to the <tr> HTML element that
is rendered for the group footer. |
java.lang.String |
getExtraHeaderHtml()
Extra HTML code to be appended to the <tr> HTML element that
is rendered for the group header. |
java.lang.String |
getFamily()
Return the family for this component. |
int |
getFirst()
Get the zero-relative row number of the first row to be displayed for a paginated table. |
java.lang.String |
getFooterText()
The text to be displayed in the group footer. |
javax.faces.component.UIComponent |
getGroupFooter()
Get group footer. |
javax.faces.component.UIComponent |
getGroupHeader()
Get group header. |
com.sun.data.provider.RowKey[] |
getHiddenRowKeys()
Get an array of hidden RowKey objects from the underlying TableDataProvider taking filtering, sorting, and pagination into account. |
int |
getPage()
Get current page number to be displayed. |
com.sun.data.provider.RowKey[] |
getRenderedRowKeys()
Get an array of rendered RowKey objects from the underlying TableDataProvider taking filtering, sorting, and pagination into account. |
int |
getRows()
Get the number of rows to be displayed for a paginated table. |
Table |
getTableAncestor()
Get the closest Table ancestor that encloses this component. |
boolean |
isAboveColumnFooter()
Set the aboveColumnFooter attribute to true to display the group
footer bar above the column footers bar. |
boolean |
isAboveColumnHeader()
Set the aboveColumnHeader attribute to true to display the group
header bar above the column headers bar. |
boolean |
isMultipleColumnFooters()
Use the multipleColumnFooters attribute when the
webuijsf:tableRowGroup contains nested webuijsf:tableColumn tags,
and you want the footers of all the webuijsf:tableColumn tags to be
shown. |
boolean |
isMultipleTableColumnFooters()
Use the multipleTableColumnFooters attribute when the
webuijsf:tableRowGroup contains nested webuijsf:tableColumn tags,
and you want the table footers of all the webuijsf:tableColumn tags to
be shown. |
boolean |
isPaginated()
Test the paginated state of this component. |
void |
processUpdates(javax.faces.context.FacesContext context)
Override the default UIComponentBase.processUpdates() processing to perform the following steps. |
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
Restore the state of this component. |
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
Save the state of this component. |
void |
setAboveColumnFooter(boolean aboveColumnFooter)
Set the aboveColumnFooter attribute to true to display the group
footer bar above the column footers bar. |
void |
setAboveColumnHeader(boolean aboveColumnHeader)
Set the aboveColumnHeader attribute to true to display the group
header bar above the column headers bar. |
void |
setExtraFooterHtml(java.lang.String extraFooterHtml)
Extra HTML code to be appended to the <tr> HTML element that
is rendered for the group footer. |
void |
setExtraHeaderHtml(java.lang.String extraHeaderHtml)
Extra HTML code to be appended to the <tr> HTML element that
is rendered for the group header. |
void |
setFooterText(java.lang.String footerText)
The text to be displayed in the group footer. |
void |
setMultipleColumnFooters(boolean multipleColumnFooters)
Use the multipleColumnFooters attribute when the
webuijsf:tableRowGroup contains nested webuijsf:tableColumn tags,
and you want the footers of all the webuijsf:tableColumn tags to be
shown. |
void |
setMultipleTableColumnFooters(boolean multipleTableColumnFooters)
Use the multipleTableColumnFooters attribute when the
webuijsf:tableRowGroup contains nested webuijsf:tableColumn tags,
and you want the table footers of all the webuijsf:tableColumn tags to
be shown. |
void |
setPaginated(boolean paginated)
Set the paginated state of this component. |
Methods inherited from class com.sun.webui.jsf.component.WebuiComponent |
---|
setId, setRendered |
Methods inherited from class javax.faces.component.UIComponentBase |
---|
decode, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, getValueExpression, isRendered, isTransient, processRestoreState, processSaveState, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding |
Methods inherited from class javax.faces.component.UIComponent |
---|
encodeAll, getContainerClientId |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COLUMN_FOOTER_BAR_ID
public static final java.lang.String COLUMN_HEADER_BAR_ID
public static final java.lang.String EMPTY_DATA_COLUMN_ID
public static final java.lang.String EMPTY_DATA_COLUMN_FACET
public static final java.lang.String EMPTY_DATA_TEXT_ID
public static final java.lang.String EMPTY_DATA_TEXT_FACET
public static final java.lang.String FOOTER_FACET
public static final java.lang.String GROUP_FOOTER_BAR_ID
public static final java.lang.String GROUP_FOOTER_ID
public static final java.lang.String GROUP_FOOTER_FACET
public static final java.lang.String GROUP_HEADER_BAR_ID
public static final java.lang.String GROUP_HEADER_ID
public static final java.lang.String GROUP_HEADER_FACET
public static final java.lang.String HEADER_FACET
public static final java.lang.String TABLE_COLUMN_FOOTER_BAR_ID
Constructor Detail |
---|
public TableRowGroup()
Method Detail |
---|
public java.lang.String getFamily()
getFamily
in class javax.faces.component.UIComponent
public void clear()
Note: Properties may have been cached via the apply request values, validate, and update phases and must be re-evaluated during the render response phase (e.g., the underlying DataProvider may have changed). This cannot always be done via encodeBegin because the component's parent may need to obtain updated properties before this component is rendered.
clear
in class TableRowGroupBase
public Table getTableAncestor()
public int getColumnCount()
public javax.faces.component.UIComponent getEmptyDataColumn()
public javax.faces.component.UIComponent getEmptyDataText()
public javax.faces.component.UIComponent getGroupFooter()
public javax.faces.component.UIComponent getGroupHeader()
public int getFirst()
Note: If rows have been removed from the underlying DataProvider, 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.
getFirst
in class TableRowGroupBase
public int getPage()
Note: The default is 1 when the table is not paginated.
getPage
in class TableRowGroupBase
public boolean isPaginated()
Note: If the paginationControls property of the Table component is true, this property will be initialized as true.
public void setPaginated(boolean paginated)
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.
paginated
- The paginated state of this component.public int getRows()
Note: UI guidelines recommend a default value of 25 rows per page.
getRows
in class TableRowGroupBase
public com.sun.data.provider.RowKey[] getHiddenRowKeys()
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.
getHiddenRowKeys
in class TableRowGroupBase
public com.sun.data.provider.RowKey[] getRenderedRowKeys()
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.
getRenderedRowKeys
in class TableRowGroupBase
public void processUpdates(javax.faces.context.FacesContext context)
processUpdates
in class TableRowGroupBase
context
- FacesContext for the current request.
java.lang.NullPointerException
- if FacesContext is null.public boolean isAboveColumnFooter()
aboveColumnFooter
attribute to true to display the group
footer bar above the column footers bar. The default is to display the group
footer below the column footers.
public void setAboveColumnFooter(boolean aboveColumnFooter)
aboveColumnFooter
attribute to true to display the group
footer bar above the column footers bar. The default is to display the group
footer below the column footers.
public boolean isAboveColumnHeader()
aboveColumnHeader
attribute to true to display the group
header bar above the column headers bar. The default is to display the group
header below the column headers.
public void setAboveColumnHeader(boolean aboveColumnHeader)
aboveColumnHeader
attribute to true to display the group
header bar above the column headers bar. The default is to display the group
header below the column headers.
public java.lang.String getExtraFooterHtml()
<tr>
HTML element that
is rendered for the group footer. Use only code that is valid in an HTML
<td>
element. The code you specify is inserted in the HTML
element, and is not checked for validity. For example, you might set this
attribute to "nowrap=`nowrap'"
.
public void setExtraFooterHtml(java.lang.String extraFooterHtml)
<tr>
HTML element that
is rendered for the group footer. Use only code that is valid in an HTML
<td>
element. The code you specify is inserted in the HTML
element, and is not checked for validity. For example, you might set this
attribute to "nowrap=`nowrap'"
.
public java.lang.String getExtraHeaderHtml()
<tr>
HTML element that
is rendered for the group header. Use only code that is valid in an HTML
<td>
element. The code you specify is inserted in the HTML
element, and is not checked for validity. For example, you might set this
attribute to "nowrap=`nowrap'"
.
public void setExtraHeaderHtml(java.lang.String extraHeaderHtml)
<tr>
HTML element that
is rendered for the group header. Use only code that is valid in an HTML
<td>
element. The code you specify is inserted in the HTML
element, and is not checked for validity. For example, you might set this
attribute to "nowrap=`nowrap'"
.
public java.lang.String getFooterText()
public void setFooterText(java.lang.String footerText)
public boolean isMultipleColumnFooters()
multipleColumnFooters
attribute when the
webuijsf:tableRowGroup
contains nested webuijsf:tableColumn
tags,
and you want the footers of all the webuijsf:tableColumn
tags to be
shown. The default is to show the footers of only the innermost level of nested
webuijsf:tableColumn
tags.
public void setMultipleColumnFooters(boolean multipleColumnFooters)
multipleColumnFooters
attribute when the
webuijsf:tableRowGroup
contains nested webuijsf:tableColumn
tags,
and you want the footers of all the webuijsf:tableColumn
tags to be
shown. The default is to show the footers of only the innermost level of nested
webuijsf:tableColumn
tags.
public boolean isMultipleTableColumnFooters()
multipleTableColumnFooters
attribute when the
webuijsf:tableRowGroup
contains nested webuijsf:tableColumn
tags,
and you want the table footers of all the webuijsf:tableColumn
tags to
be shown. The default is to show the table footers of only the innermost level
of nested webuijsf:tableColumn
tags.
public void setMultipleTableColumnFooters(boolean multipleTableColumnFooters)
multipleTableColumnFooters
attribute when the
webuijsf:tableRowGroup
contains nested webuijsf:tableColumn
tags,
and you want the table footers of all the webuijsf:tableColumn
tags to
be shown. The default is to show the table footers of only the innermost level
of nested webuijsf:tableColumn
tags.
public void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class TableRowGroupBase
public java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState
in interface javax.faces.component.StateHolder
saveState
in class TableRowGroupBase
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |