|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.faces.component.UIComponent
oracle.adf.view.faces.component.UIXComponent
oracle.adf.view.faces.component.UIXComponentBase
oracle.adf.view.faces.component.UIXCollection
oracle.adf.view.faces.component.UIXIterator
oracle.adf.view.faces.component.UIXTable
oracle.adf.view.faces.component.core.data.CoreTable
The ADF Table is used to display tabular data. It also supports selection (both single and multiple), sorting, record navigation and detail-disclosure.
The ADF Table component uses a model to access the data
in the underlying list. The specific model class is
oracle.adf.view.faces.model.CollectionModel.
You may also use other model instances, e.g.,
java.util.List ,
array, and javax.faces.model.DataModel.
The Table will automatically convert the instance
into a CollectionModel.
The immediate children of a Table component must all be
<af:column> components. Each visible ADF Column
component creates a separate column in the Table.
For more information see the documentation for
<column>
When the list being displayed by a Table is huge, you can enable the Table
to break up the list into ranges and display a single range at a time.
Range controls are provided on the Table to let the user scroll to the next range,
or to go back to the previous range. If the total size of the list is known, a
control to let the user jump directly to a particular part of the list is also
provided on the Table. Use the Table attributes "rows" and "first" to control the
range navigation feature.
When the user changes the range, the Table fires a RangeChangeEvent.
You can configure the Table to display or hide additional details of a particular row in response to a user gesture. When the details feature is enabled, a new column containing a toggle (per row) will render in the Table. When a toggle is activated, the details for that row are displayed. When a toggle is deactivated, the details for the row are hidden. The user can also display or hide the details for all rows at the same time (the controls for this feature are enabled by setting the "allDetailsEnabled" property to true.)
To enable the details feature set the "detailStamp" facet on the Table. Place the components that are used to show the details (of a row), inside this facet. In the following example, the Person's age is displayed in the details section:
<af:table var="row">
<f:facet name="detailStamp">
<af:outputText value="#{row.age}"/>
</f:facet>
</af:table>
When a detail row is shown or hidden the Table generates a
DisclosureEvent. If all detail rows are shown or hidden
the Table fires a DisclosureAllEvent.
The selection feature of a Table lets the user select one or more rows in the list. The user can then perform some operation on the selected rows by activating an appropriate ActionSource component (e.g., by clicking on an ADF CommandButton). Use the "selection" facet on the Table to enable the selection feature.
There are two types of selection - single and multiple. The type of
selection is determined by the component defined as the "selection" facet.
Use the <af:tableSelectOne> component to enable
single selection, and <af:tableSelectMany> for
multiple selection.
The Table component supports sorting columns in ascending or descending order. A special 3D border on a column header lets the user know that the column is sortable. When the user clicks on a column header to sort a previously unsorted column, the Table sorts the column data in ascending order. Subsequent clicks on the same header sorts the data in the reverse order.
There are three requirements to enable sorting: the underlying table model must support sorting, the "sortProperty" and "sortable" attributes must be set on the column to enable the sort capability for that column.
To support sorting, the CollectionModel instance
must implement the following methods:
public boolean isSortable(String propertyName)
public void setSortCriteria(List criteria)
public List getSortCriteria()
If the underlying model is not a CollectionModel, the
Table automatically examines the actual data to determine which properties are
sortable. Any column that has data that
implements java.lang.Comparable is sortable. This
automatic support cannot be nearly as efficient as coding sorting
directly into a CollectionModel (for instance,
by translating the sort into an "ORDER BY" SQL clause), but
is sufficient for small data sets.
To associate a column with a particular property-name to be used for
sorting purposes, use the "sortProperty" attribute on the column.
To enable the UI for sorting a particular column, set the
"sortable" property to true.
For more information see the documentation for
<column>.
In the following example, both columns are sortable. Sorting the first column sorts by the "firstname" property; sorting the second column sorts by the "lastname" property.
<af:table ...>
<af:column sortProperty="firstname" sortable="true">
<f:facet name="header">
<af:outputText value="Firstname" />
</f:facet>
...
</af:column>
<af:column>
<f:facet name="header" sortProperty="lastname" sortable="true">
<af:outputText value="Lastname" />
</f:facet>
...
</af:column>
</af:table>Banding is a technique where groups of rows (or columns) are displayed with alternating background colors. This helps to differentiate between adjacent rows (or columns).
The "banding" attribute on the Table controls the type of banding to use. The "bandingInterval" attribute controls the number of consecutive rows (or columns) that are colored the same.
Note that the above banding attributes on the Table are ignored when the "bandingShade" attribute is used on the Column.
<af:table value="#{myManagedBean.allEmployees}"
bandingInterval="2" banding="row" var="emp">
<af:column>
<f:facet name="header">
<af:outputText value="Name"/>
</f:facet>
<af:outputText value="#{emp.ename}"/>
</af:column>
<af:column>
<f:facet name="header">
<af:outputText value="Department Number"/>
</f:facet>
<af:outputText value="#{emp.deptno}"/>
</af:column>
</af:table>
| Type | Phases | Description |
|---|---|---|
oracle.adf.view.faces.event.DisclosureEvent |
Apply Request Values Invoke Application |
Generated when a detail row is shown or hidden. |
oracle.adf.view.faces.event.DisclosureAllEvent |
Apply Request Values Invoke Application |
Generated when all detail rows are shown or hidden. |
oracle.adf.view.faces.event.RangeChangeEvent |
Apply Request Values Invoke Application |
Generated when the user changes the range |
oracle.adf.view.faces.event.SortEvent |
Apply Request Values Invoke Application |
Generated when the user sorts a column. |
oracle.adf.view.faces.event.SelectionEvent |
Apply Request Values Invoke Application |
Generated when the user selects a row or rows and submits. |
| Fields inherited from class oracle.adf.view.faces.component.UIXTable |
DETAIL_STAMP_FACET, DISCLOSURE_ALL_LISTENER_KEY, DISCLOSURE_LISTENER_KEY, DISCLOSURE_STATE_KEY, IMMEDIATE_KEY, RANGE_CHANGE_LISTENER_KEY, SELECTION_LISTENER_KEY, SELECTION_STATE_KEY, SHOW_ALL_KEY, SORT_LISTENER_KEY |
| Fields inherited from class oracle.adf.view.faces.component.UIXIterator |
FIRST_KEY, ROWS_KEY, VALUE_KEY, VAR_KEY, VAR_STATUS_KEY |
| Fields inherited from class oracle.adf.view.faces.component.UIXComponentBase |
BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY |
| Fields inherited from interface javax.faces.component.NamingContainer |
SEPARATOR_CHAR |
| Constructor Summary | |
|
CoreTable()
Construct an instance of the CoreTable. |
protected |
CoreTable(java.lang.String rendererType)
Construct an instance of the CoreTable. |
| Method Summary | |
UIComponent |
getActions()
the component used for performing table actions that are independent of row selection. |
java.lang.String |
getBanding()
Gets the banding type to use on this table. |
int |
getBandingInterval()
Gets the number of rows in each banding group. |
protected FacesBean.Type |
getBeanType()
|
java.lang.String |
getEmptyText()
Gets the text to display inside this component when it is empty |
java.lang.String |
getFamily()
|
UIComponent |
getFooter()
the component used to render the table footer. |
UIComponent |
getHeader()
the component used to render the table header. |
java.lang.String |
getInlineStyle()
Gets the inline CSS style for this element |
java.lang.String |
getOnclick()
Gets an onclick Javascript handler. |
java.lang.String |
getOndblclick()
Gets an ondblclick Javascript handler. |
java.lang.String |
getOnkeydown()
Gets an onkeydown Javascript handler. |
java.lang.String |
getOnkeypress()
Gets an onkeypress Javascript handler. |
java.lang.String |
getOnkeyup()
Gets an onkeyup Javascript handler. |
java.lang.String |
getOnmousedown()
Gets an onmousedown Javascript handler. |
java.lang.String |
getOnmousemove()
Gets an onmousemove Javascript handler. |
java.lang.String |
getOnmouseout()
Gets an onmouseout Javascript handler. |
java.lang.String |
getOnmouseover()
Gets an onmouseover Javascript handler. |
java.lang.String |
getOnmouseup()
Gets an onmouseup Javascript handler. |
java.lang.String[] |
getPartialTriggers()
Gets the IDs of the components that should trigger a partial update. |
UIComponent |
getSelection()
the component used for selecting rows in the table. |
java.lang.String |
getShortDesc()
Gets the short description of the bean. |
java.lang.String |
getStyleClass()
Gets the CSS style class of the bean. |
java.lang.String |
getSummary()
Gets the summary of this table's purpose and structure for user agents rendering to non-visual media. |
java.lang.String |
getWidth()
Gets the width of this component. |
boolean |
isAllDetailsEnabled()
Gets whether or not to enable the show/hide all links above the table, which allow the user to show/hide all the detail rows. |
void |
setActions(UIComponent actionsFacet)
the component used for performing table actions that are independent of row selection. |
void |
setAllDetailsEnabled(boolean allDetailsEnabled)
Sets whether or not to enable the show/hide all links above the table, which allow the user to show/hide all the detail rows. |
void |
setBanding(java.lang.String banding)
Sets the banding type to use on this table. |
void |
setBandingInterval(int bandingInterval)
Sets the number of rows in each banding group. |
void |
setEmptyText(java.lang.String emptyText)
Sets the text to display inside this component when it is empty |
void |
setFooter(UIComponent footerFacet)
the component used to render the table footer. |
void |
setHeader(UIComponent headerFacet)
the component used to render the table header. |
void |
setInlineStyle(java.lang.String inlineStyle)
Sets the inline CSS style for this element |
void |
setOnclick(java.lang.String onclick)
Sets an onclick Javascript handler. |
void |
setOndblclick(java.lang.String ondblclick)
Sets an ondblclick Javascript handler. |
void |
setOnkeydown(java.lang.String onkeydown)
Sets an onkeydown Javascript handler. |
void |
setOnkeypress(java.lang.String onkeypress)
Sets an onkeypress Javascript handler. |
void |
setOnkeyup(java.lang.String onkeyup)
Sets an onkeyup Javascript handler. |
void |
setOnmousedown(java.lang.String onmousedown)
Sets an onmousedown Javascript handler. |
void |
setOnmousemove(java.lang.String onmousemove)
Sets an onmousemove Javascript handler. |
void |
setOnmouseout(java.lang.String onmouseout)
Sets an onmouseout Javascript handler. |
void |
setOnmouseover(java.lang.String onmouseover)
Sets an onmouseover Javascript handler. |
void |
setOnmouseup(java.lang.String onmouseup)
Sets an onmouseup Javascript handler. |
void |
setPartialTriggers(java.lang.String[] partialTriggers)
Sets the IDs of the components that should trigger a partial update. |
void |
setSelection(UIComponent selectionFacet)
the component used for selecting rows in the table. |
void |
setShortDesc(java.lang.String shortDesc)
Sets the short description of the bean. |
void |
setStyleClass(java.lang.String styleClass)
Sets the CSS style class of the bean. |
void |
setSummary(java.lang.String summary)
Sets the summary of this table's purpose and structure for user agents rendering to non-visual media. |
void |
setWidth(java.lang.String width)
Sets the width of this component. |
| Methods inherited from class oracle.adf.view.faces.component.UIXIterator |
createVarStatusMap, encodeChildren, getFirst, getRendersChildren, getRows, getValue, getVar, getVarStatus, setFirst, setRows, setValue, setVar, setVarStatus |
| Methods inherited from class oracle.adf.view.faces.component.UIXCollection |
clearCurrencyStringCache, decodeChildrenImpl, encodeBegin, encodeEnd, getCollectionModel, getCollectionModel, getCurrencyString, getLocalClientId, getRowCount, getRowData, getRowData, getRowIndex, getRowKey, getSortCriteria, isRowAvailable, isRowAvailable, isSortable, postRowDataChange, preRowDataChange, processComponent, processDecodes, processSaveState, resetStampState, setCurrencyString, setRowIndex, setRowKey, updateChildrenImpl, validateChildrenImpl |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface oracle.adf.view.faces.component.CollectionComponent |
getFirst, getRows, getVar |
| Methods inherited from interface oracle.adf.view.faces.model.RowKeyIndex |
getRowCount, getRowData, getRowData, getRowIndex, getRowKey, isRowAvailable, isRowAvailable, setRowIndex, setRowKey |
| Field Detail |
public static final java.lang.String BANDING_ROW
public static final java.lang.String BANDING_NONE
public static final java.lang.String BANDING_COLUMN
public static final FacesBean.Type TYPE
public static final PropertyKey ALL_DETAILS_ENABLED_KEY
public static final PropertyKey SHORT_DESC_KEY
public static final PropertyKey PARTIAL_TRIGGERS_KEY
public static final PropertyKey ONCLICK_KEY
public static final PropertyKey ONDBLCLICK_KEY
public static final PropertyKey ONMOUSEDOWN_KEY
public static final PropertyKey ONMOUSEUP_KEY
public static final PropertyKey ONMOUSEOVER_KEY
public static final PropertyKey ONMOUSEMOVE_KEY
public static final PropertyKey ONMOUSEOUT_KEY
public static final PropertyKey ONKEYPRESS_KEY
public static final PropertyKey ONKEYDOWN_KEY
public static final PropertyKey ONKEYUP_KEY
public static final PropertyKey STYLE_CLASS_KEY
public static final PropertyKey INLINE_STYLE_KEY
public static final PropertyKey WIDTH_KEY
public static final PropertyKey EMPTY_TEXT_KEY
public static final PropertyKey SUMMARY_KEY
public static final PropertyKey BANDING_KEY
public static final PropertyKey BANDING_INTERVAL_KEY
public static final java.lang.String FOOTER_FACET
public static final java.lang.String HEADER_FACET
public static final java.lang.String SELECTION_FACET
public static final java.lang.String ACTIONS_FACET
public static final java.lang.String COMPONENT_FAMILY
public static final java.lang.String COMPONENT_TYPE
| Constructor Detail |
public CoreTable()
protected CoreTable(java.lang.String rendererType)
| Method Detail |
public final UIComponent getFooter()
public final void setFooter(UIComponent footerFacet)
public final UIComponent getHeader()
public final void setHeader(UIComponent headerFacet)
public final UIComponent getSelection()
public final void setSelection(UIComponent selectionFacet)
public final UIComponent getActions()
public final void setActions(UIComponent actionsFacet)
public final boolean isAllDetailsEnabled()
public final void setAllDetailsEnabled(boolean allDetailsEnabled)
public final java.lang.String getShortDesc()
public final void setShortDesc(java.lang.String shortDesc)
public final java.lang.String[] getPartialTriggers()
public final void setPartialTriggers(java.lang.String[] partialTriggers)
public final java.lang.String getOnclick()
public final void setOnclick(java.lang.String onclick)
public final java.lang.String getOndblclick()
public final void setOndblclick(java.lang.String ondblclick)
public final java.lang.String getOnmousedown()
public final void setOnmousedown(java.lang.String onmousedown)
public final java.lang.String getOnmouseup()
public final void setOnmouseup(java.lang.String onmouseup)
public final java.lang.String getOnmouseover()
public final void setOnmouseover(java.lang.String onmouseover)
public final java.lang.String getOnmousemove()
public final void setOnmousemove(java.lang.String onmousemove)
public final java.lang.String getOnmouseout()
public final void setOnmouseout(java.lang.String onmouseout)
public final java.lang.String getOnkeypress()
public final void setOnkeypress(java.lang.String onkeypress)
public final java.lang.String getOnkeydown()
public final void setOnkeydown(java.lang.String onkeydown)
public final java.lang.String getOnkeyup()
public final void setOnkeyup(java.lang.String onkeyup)
public final java.lang.String getStyleClass()
public final void setStyleClass(java.lang.String styleClass)
public final java.lang.String getInlineStyle()
public final void setInlineStyle(java.lang.String inlineStyle)
public final java.lang.String getWidth()
public final void setWidth(java.lang.String width)
public final java.lang.String getEmptyText()
public final void setEmptyText(java.lang.String emptyText)
public final java.lang.String getSummary()
public final void setSummary(java.lang.String summary)
public final java.lang.String getBanding()
public final void setBanding(java.lang.String banding)
public final int getBandingInterval()
public final void setBandingInterval(int bandingInterval)
public java.lang.String getFamily()
getFamily in class UIXTableprotected FacesBean.Type getBeanType()
getBeanType in class UIXTable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||