|
||||||||||
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.TableBase
com.sun.webui.jsf.component.Table
public class Table
Component that represents a table. The table component provides a layout mechanism for displaying table actions. 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.
Note: Column headers and footers are rendered by TableRowGroupRenderer. Table column footers are rendered by TableRenderer.
Only children of type TableRowGroup should be processed by renderers associated with this component.
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.Table.level = FINE
See TLD docs for more information.
Field Summary | |
---|---|
static java.lang.String |
ACTIONS_BOTTOM_FACET
The facet name for the bottom actions area. |
static java.lang.String |
CUSTOM_FILTER
The value for the custom filter option. |
static java.lang.String |
CUSTOM_FILTER_APPLIED
The value for the custom filter applied option. |
static java.lang.String |
EMBEDDED_PANELS_BAR_ID
The id for the embedded panels bar. |
static java.lang.String |
EMBEDDED_PANELS_FACET
The facet name for embedded panels. |
static java.lang.String |
EMBEDDED_PANELS_ID
The component id for embedded panels. |
static java.lang.String |
FILTER_FACET
The facet name for the filter area. |
static java.lang.String |
FILTER_PANEL_FACET
The facet name for the filter panel. |
static java.lang.String |
FOOTER_FACET
The facet name for the footer area. |
static java.lang.String |
PREFERENCES_PANEL_FACET
The facet name for the preferences panel. |
static java.lang.String |
SORT_PANEL_FACET
The facet name for the sort panel. |
static java.lang.String |
TABLE_ACTIONS_BOTTOM_BAR_ID
The id for the bottom actions bar. |
static java.lang.String |
TABLE_ACTIONS_BOTTOM_FACET
The facet name for bottom actions. |
static java.lang.String |
TABLE_ACTIONS_BOTTOM_ID
The component id for bottom actions. |
static java.lang.String |
TABLE_ACTIONS_TOP_BAR_ID
The id for the top actions bar. |
static java.lang.String |
TABLE_ACTIONS_TOP_FACET
The facet name for top actions. |
static java.lang.String |
TABLE_ACTIONS_TOP_ID
The component id for top actions. |
static java.lang.String |
TABLE_FOOTER_BAR_ID
The id for the table footer. |
static java.lang.String |
TABLE_FOOTER_FACET
The facet name for the table footer. |
static java.lang.String |
TABLE_FOOTER_ID
The component id for the table footer. |
static java.lang.String |
TABLE_ID
The id for the table. |
static java.lang.String |
TITLE_BAR_ID
The id for the title bar. |
static java.lang.String |
TITLE_FACET
The facet name for the title area. |
Fields inherited from class com.sun.webui.jsf.component.TableBase |
---|
ACTIONS_TOP_FACET |
Fields inherited from interface javax.faces.component.NamingContainer |
---|
SEPARATOR_CHAR |
Constructor Summary | |
---|---|
Table()
Default constructor |
Method Summary | |
---|---|
void |
clear()
Clear cached properties. |
void |
encodeBegin(javax.faces.context.FacesContext context)
If the rendered property is true, render the begining of the current state of this UIComponent to the response contained in the specified FacesContext. |
int |
getColumnCount()
Get the max number of columns found for all TableRowGroup children. |
int |
getColumnHeadersCount()
Get the number of column header bars for all TableRowGroup children. |
javax.faces.component.UIComponent |
getEmbeddedPanels()
Get embedded panels. |
java.lang.String |
getExtraActionBottomHtml()
Extra HTML code to be appended to the <td> HTML element that
is rendered for the Action Bar (bottom). |
java.lang.String |
getExtraActionTopHtml()
Extra HTML code to be appended to the <td> HTML element that
is rendered for the Action Bar (top). |
java.lang.String |
getExtraFooterHtml()
Extra HTML code to be appended to the <td> HTML element that
is rendered for the table footer. |
java.lang.String |
getExtraPanelHtml()
Extra HTML code to be appended to the <td> HTML element that
is rendered for an embedded panel. |
java.lang.String |
getExtraTitleHtml()
Extra HTML code to be appended to the <caption> HTML element
that is rendered for the table title. |
java.lang.String |
getFamily()
Return the family for this component. |
java.lang.String |
getFilterId()
Get the HTML element ID of the dropDown component used to display table filter options. |
static Option[] |
getFilterOptions(Option[] options,
boolean customFilterApplied)
Get the "custom filter" options used for a table filter menu. |
int |
getFirst()
Get the zero-relative row number of the first row to be displayed for a paginated table for all TableRowGroup children. |
java.lang.String |
getFooterText()
The text to be displayed in the table footer, which expands across the width of the table. |
int |
getHiddenSelectedRowsCount()
Get the number of hidden selected rows for all TableRowGroup children. |
int |
getPageCount()
Get the max number of pages for all TableRowGroup children. |
int |
getRowCount()
Get the number of rows in the underlying TableDataProvider for all TableRowGroup children. |
int |
getRows()
Get the number of rows to be displayed per page for a paginated table for all TableRowGroup children. |
javax.faces.component.UIComponent |
getTableActionsBottom()
Get bottom actions. |
javax.faces.component.UIComponent |
getTableActionsTop()
Get top actions. |
int |
getTableColumnFootersCount()
Get the number of table column footer bars for all TableRowGroup children. |
javax.faces.component.UIComponent |
getTableFooter()
Get table footer. |
TableRowGroup |
getTableRowGroupChild()
Get the first TableRowGroup child found for the specified component that have a rendered property of true. |
int |
getTableRowGroupCount()
Get the number of child TableRowGroup components found for this component that have a rendered property of true. |
boolean |
isInternalVirtualForm()
Flag indicating that this component should use a virtual form. |
boolean |
isPaginationControls()
Show the table pagination controls, which allow users to change which page is displayed. |
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 |
setExtraActionBottomHtml(java.lang.String extraActionBottomHtml)
Extra HTML code to be appended to the <td> HTML element that
is rendered for the Action Bar (bottom). |
void |
setExtraActionTopHtml(java.lang.String extraActionTopHtml)
Extra HTML code to be appended to the <td> HTML element that
is rendered for the Action Bar (top). |
void |
setExtraFooterHtml(java.lang.String extraFooterHtml)
Extra HTML code to be appended to the <td> HTML element that
is rendered for the table footer. |
void |
setExtraPanelHtml(java.lang.String extraPanelHtml)
Extra HTML code to be appended to the <td> HTML element that
is rendered for an embedded panel. |
void |
setExtraTitleHtml(java.lang.String extraTitleHtml)
Extra HTML code to be appended to the <caption> HTML element
that is rendered for the table title. |
void |
setFooterText(java.lang.String footerText)
The text to be displayed in the table footer, which expands across the width of the table. |
void |
setInternalVirtualForm(boolean internalVirtualForm)
Flag indicating that this component should use a virtual form. |
void |
setPaginationControls(boolean paginationControls)
Show the table pagination controls, which allow users to change which page is displayed. |
Methods inherited from class com.sun.webui.jsf.component.WebuiComponent |
---|
processDecodes, processUpdates, processValidators, setId, setRendered |
Methods inherited from class javax.faces.component.UIComponentBase |
---|
broadcast, decode, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, getValueExpression, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding, setValueExpression |
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 ACTIONS_BOTTOM_FACET
public static final java.lang.String CUSTOM_FILTER
public static final java.lang.String CUSTOM_FILTER_APPLIED
public static final java.lang.String EMBEDDED_PANELS_BAR_ID
public static final java.lang.String EMBEDDED_PANELS_ID
public static final java.lang.String EMBEDDED_PANELS_FACET
public static final java.lang.String FILTER_FACET
public static final java.lang.String FILTER_PANEL_FACET
public static final java.lang.String FOOTER_FACET
public static final java.lang.String PREFERENCES_PANEL_FACET
public static final java.lang.String SORT_PANEL_FACET
public static final java.lang.String TABLE_ID
public static final java.lang.String TABLE_ACTIONS_BOTTOM_BAR_ID
public static final java.lang.String TABLE_ACTIONS_BOTTOM_ID
public static final java.lang.String TABLE_ACTIONS_BOTTOM_FACET
public static final java.lang.String TABLE_ACTIONS_TOP_BAR_ID
public static final java.lang.String TABLE_ACTIONS_TOP_ID
public static final java.lang.String TABLE_ACTIONS_TOP_FACET
public static final java.lang.String TABLE_FOOTER_BAR_ID
public static final java.lang.String TABLE_FOOTER_ID
public static final java.lang.String TABLE_FOOTER_FACET
public static final java.lang.String TITLE_BAR_ID
public static final java.lang.String TITLE_FACET
Constructor Detail |
---|
public Table()
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).
clear
in class TableBase
public int getColumnHeadersCount()
public int getHiddenSelectedRowsCount()
public int getFirst()
public int getPageCount()
public int getRows()
public int getRowCount()
public int getColumnCount()
public int getTableColumnFootersCount()
public TableRowGroup getTableRowGroupChild()
public int getTableRowGroupCount()
public javax.faces.component.UIComponent getTableActionsBottom()
public javax.faces.component.UIComponent getTableActionsTop()
public java.lang.String getFilterId()
Note: This is the fully qualified ID rendered in the outter tag enclosing the HTML element. Required for Javascript functions to set the dropDown styles when the embedded filter panel is opened and to reset the default selected value when the panel is closed.
getFilterId
in class TableBase
public static Option[] getFilterOptions(Option[] options, boolean customFilterApplied)
Note: UI guidelines state that a "Custom Filter" option should be added to the filter menu, used to open the table filter panel. Thus, if the CUSTOM_FILTER option is selected, Javascript invoked via the onChange event will open the table filter panel.
UI guidelines also state that a "Custom Filter Applied" option should be added to the filter menu, indicating that a custom filter has been applied. In this scenario, set the selected property of the filter menu as CUSTOM_FILTER_APPLIED. This selection should persist until another menu option has been selected.
options
- An array of options to append to -- may be null.customFilterApplied
- Flag indicating custom filter is applied.
public javax.faces.component.UIComponent getTableFooter()
public javax.faces.component.UIComponent getEmbeddedPanels()
public java.lang.String getExtraActionBottomHtml()
<td>
HTML element that
is rendered for the Action Bar (bottom). 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 "style=`myActionBarStyle'"
.
public void setExtraActionBottomHtml(java.lang.String extraActionBottomHtml)
<td>
HTML element that
is rendered for the Action Bar (bottom). 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 "style=`myActionBarStyle'"
.
public java.lang.String getExtraActionTopHtml()
<td>
HTML element that
is rendered for the Action Bar (top). 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 "style=`myActionBarStyle'"
.
public void setExtraActionTopHtml(java.lang.String extraActionTopHtml)
<td>
HTML element that
is rendered for the Action Bar (top). 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 "style=`myActionBarStyle'"
.
public java.lang.String getExtraFooterHtml()
<td>
HTML element that
is rendered for the table 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)
<td>
HTML element that
is rendered for the table 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 getExtraPanelHtml()
<td>
HTML element that
is rendered for an embedded panel. 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.
public void setExtraPanelHtml(java.lang.String extraPanelHtml)
<td>
HTML element that
is rendered for an embedded panel. 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.
public java.lang.String getExtraTitleHtml()
<caption>
HTML element
that is rendered for the table title. Use only code that is valid in an HTML
<caption>
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 "style=`myTitleStyle'"
.
public void setExtraTitleHtml(java.lang.String extraTitleHtml)
<caption>
HTML element
that is rendered for the table title. Use only code that is valid in an HTML
<caption>
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 "style=`myTitleStyle'"
.
public java.lang.String getFooterText()
public void setFooterText(java.lang.String footerText)
public boolean isInternalVirtualForm()
public void setInternalVirtualForm(boolean internalVirtualForm)
public boolean isPaginationControls()
public void setPaginationControls(boolean paginationControls)
public void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class TableBase
public java.lang.Object saveState(javax.faces.context.FacesContext _context)
saveState
in interface javax.faces.component.StateHolder
saveState
in class TableBase
public void encodeBegin(javax.faces.context.FacesContext context) throws java.io.IOException
encodeBegin
in class javax.faces.component.UIComponentBase
context
- FacesContext for the current request.
java.io.IOException
- if an input/output error occurs while rendering.
java.lang.NullPointerException
- if FacesContext is null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |