Note: This procedure assumes inline data (as shown in the example at the end of this topic) has been inserted in the UIX file. The inline data named "tableData" provides the data for the rows.
To use detail in a table component:
Note: To use data binding, see Data Binding a Component Attribute.
Note: This procedure does not produce an interactive detail table. You must handle the event for getting the index of the row that the user has chosen to show/hide, and then determine whether to show or hide the detail area depending on the event name. This event handler should create a data set that contains the current disclosure state of the table. See "Creating Tables in ADF UIX" in the ADF UIX Developer's Guide for details about implementing the event handler and a class that uses the data set to create a DataObjectList that determines the previous disclosure state of the table and the new state.
...
<provider>
<data name="tableData">
<inline>
<row name="Person 1" age="11" blood="B" phone="555-1111"/>
<row name="Person 2" age="12" blood="AB" phone="555-2222"/>
<row name="Person 3" age="13" blood="O" phone="555-3333"/>
<row name="Person 4" age="14" blood="B" phone="555-4444"/>
<row name="Person 5" age="14" blood="O" phone="555-5555"/>
<row name="Person 6" age="16" blood="AB" phone="555-6666"/>
</inline>
</data>
</provider>
...
<contents>
...
<table alternateText="No Items Found."
tableData="${uix.data.tableData.row}"
allDetailsEnabled="true"
formSubmitted="true"
width="55%">
<contents>
<!-- regular column stamp -->
<column>
<columnHeader>
<styledText text="Name"/>
</columnHeader>
<contents>
<styledText text="${uix.current.name}"/>
</contents>
</column>
<column>
<columnHeader>
<styledText text="Age"/>
</columnHeader>
<contents>
<styledText text="${uix.current.age}"/>
</contents>
</column>
</contents>
<!-- list indicating which detail rows are currently disclosed -->
<detailDisclosure>
<row disclosed="false"/>
<row disclosed="false"/>
<row disclosed="true"/>
<row disclosed="false"/>
<row disclosed="false"/>
<row disclosed="true"/>
</detailDisclosure>
<detail>
<!-- this is the details stamp -->
<labeledFieldLayout>
<contents>
Name
<styledText text="${uix.current.name}" styleClass="OraDataText"/>
Age
<styledText text="${uix.current.age}" styleClass="OraDataText"/>
Blood Group
<styledText text="${uix.current.blood}" styleClass="OraDataText"/>
Phone Number
<styledText text="${uix.current.phone}" styleClass="OraDataText"/>
</contents>
</labeledFieldLayout>
</detail>
</table>
</contents>
...
About Table and its Named
Children
About Data Binding in
Tables
Creating a Column
Working with Table Components
Copyright © 1997, 2004, Oracle. All rights reserved.