Note: For layouts requiring a table-like appearance,
consider using tableLayout
instead.
Table components in ADF UIX are elements for displaying and updating tabular data that are similar in nature.
Tabular data items are described in a two-dimensional format. In other words, the data items being compared exist in rows, and the number of facets or actions to take on the items exist as columns. Each intersection of a data item row and column is a cell. Thus, a table is made up of many cells, with a row of cells and a given number of columns for each data item, and with each column of cells representing one item facet being compared across many data items.
For a single table, the number of rows (i.e., number of data items) is likely to vary over time, but the number of columns (i.e., the number of facets on the items) will not. For example, in a table representing a shopping cart, the columns could be price and quantity of an item and the number of rows (items) is zero at the onset of shopping. At the end of shopping, there could be multiple items or rows in the table, but the number of facets (columns) remain the same.
The main table components used to create tabular data are table
and column
. A data table is created by a series of column
elements as indexed children of table
. By themselves, table
and column
do not display anything visible until data is
configured or "stamped" in the table cells. A table has one stamp per
column. Each column stamp gets its visible contents to stamp (or render)
from the indexed children of column
. The indexed children
can be text, buttons, or any other components.
For each column stamp, UIX automatically repeats or stamps the indexed
children once in all the cells of the table column. The number of rows
UIX knows to stamp down a column is determined by the length of a
DataObjectList. That DataObjectList is bound to the tableData
attribute of table
. Each DataObject in the DataObjectList
corresponds to a row of data. UIX renders each column stamp once for
every DataObject in the DataObjectList.
For example, using inline data the following UIX XML code renders a table with two columns and three rows. The tableData attribute is bound to inline data under tha name "demoTableData". The "demoRowData" DataObjectList comprises three DataObjects. Each cell in the first table column is stamped by a text child. Each cell in the second column is stamped by a button child.
Example:
<dataScope xmlns="http://xmlns.oracle.com/uix/ui">
<provider>
<!-- all the data used by the table demo -->
<data name="demoTableData">
<inline>
<!-- all the row DataObjects used by the table for tableData -->
<demoRowData/>
<demoRowData/>
<demoRowData/>
</inline>
</data>
</provider>
<contents>
<table name="table1"
tableData="${uix.data.demoTableData.demoRowData}">
<contents>
<column>
<contents>
<!-- first column stamp -->
<text text="Sample text"/>
</contents>
</column>
<column>
<contents>
<!-- second column stamp -->
<button text="Push Me"/>
</contents>
</column>
</contents>
</table>
</contents>
</dataScope>
The code above produces the following table:
About Table and its Named
Children
About Column
and its Named Children
About
Data Binding in Tables
About Partial
Page Rendering
About TableProxy
About TableLayout
Creating a Table
Working with Table Components
Copyright © 1997, 2004, Oracle. All rights reserved.