8-34 Desktop Integration Developers Guide for Oracle Application Development Framework
8.8.5 Creating a Dependent List of Values in an Excel Worksheet and an ADF Table Component Column
Use an instance of the ADF List of Values component and an instance of the TreeNodeList subcomponent to create a dependent list of values where you render the
parent and the child list of values.
■
Parent list of values in the Excel worksheet An instance of the ADF List of Values component renders the parent list of values
in the Excel worksheet.
■
Child list of values in an ADF Table component column An instance of the TreeNodeList subcomponent renders the child list of values in
the ADF Table component column. Specify a list binding as a value for the parent ADF List of Values component’s
ListID property. You specify a tree binding attribute as a value for the child TreeNodeList subcomponent’s List property, and the same list binding referenced by
the parent ADF List of Values component as a value for its DependsOnList property.
Ensure that the tree binding attribute is associated with a model-driven list before you add the tree binding to your page definition file. For information about creating a
model-driven list, see the How to Create a Model-Driven List section of the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development
Framework. For information about adding a list and tree binding to your page definition file, see
Section 4.3, Working with Page Definition Files for an Integrated Excel Workbook.
For more information about the ADF List of Values component, see Section A.5, ADF
List of Values Component Properties. For information about the TreeNodeList
subcomponent, see Section A.6, TreeNodeList Subcomponent Properties.
To create a dependent list of values in an Excel worksheet and an ADF Table component column:
1.
Open the integrated Excel workbook.
2.
Insert an ADF List of Values component into your integrated Excel workbook, as described in
Section 6.6, Inserting an ADF List of Values Component.
3.
Display the property inspector for the ADF List of Values component and set the value of the ListID property to the list binding that is to serve as the parent list of
values in the dependent list of values.
4. Click OK.
5.
Display the property inspector for the ADF Table component and invoke the TableColumn Collection Editor by clicking the ellipsis button ... beside the input
field for TableColumn[] Array.
6. Click Add to add a new column to the ADF Table component to serve as the child
list of values in the runtime-dependent list of values.
7.
Choose the appropriate option for the newly created column:
Note: If the child list and the parent list are bound to columns in the
same ADF Table component, the child list items are changed for the current row only, when the end user changes the parent list selection.
Adding Interactivity to Your Integrated Excel Workbook 8-35
■
Click the ellipsis button ... beside the input field for InsertComponent to configure the runtime list of values for insert operations.
■
Click the ellipsis button ... beside the input field for UpdateComponent to configure the runtime list of values for update and download operations.
In both options, the Select subcomponent to create dialog appears.
8. Select TreeNodeList and click OK.
9.
Expand the property that you selected in Step 7 and configure values as follows:
■
Select the same list binding that you specified as a value for the ADF List of Values component’s ListID property in Step 3 as a value for the
DependsOnList property.
■
Select a tree binding attribute associated with a model-driven list for the List property.
■
Configure the ReadOnly property as desired.
10. Click OK.
Figure 8–28 shows the property inspector for a child ADF Desktop Integration Tree
Node component where the countryList list binding is specified as the parent list of values.
Figure 8–28 Design Time Dependent List of Values in an Excel Worksheet and an ADF
Table Components Column
8.8.6 What Happens at Runtime When a Dependent List of Values Renders in an Excel Worksheet and an ADF Table Component Column
At runtime, the ADF List of Values component renders the parent list of values and the ADF Table component renders the child list of values in the column that you
8-36 Desktop Integration Developers Guide for Oracle Application Development Framework
configured to display the TreeNodeList subcomponent. When the end user selects a value from the parent list of values, the selected value determines the list of values in
the child list.
Figure 8–29 shows an example where the value that the end user selects in the
CountryId list of values determines the list of values that appears in the StateId
column of the ADF Table component.
Figure 8–29 Runtime-Dependent List of Values in an Excel Worksheet and an ADF Table
Components Column
8.9 Using EL Expression to Generate an Excel Formula
You can use an EL expression to generate an Excel formula as the vlaue of an ADF component. For example, you can use an Excel HYPERLINK function in an EL
expression. If you use the Excel HYPERLINK function in an EL expression, you must enclose the HYPERLINK function within an Excel T function if you want an Oracle
ADF component, such as an ADF Output Text component, to display a hyperlink at runtime.
You enclose the HYPERLINK function because ADF Desktop Integration interprets the Excel formula. To work around this, you wrap the T function around the HYERLINK
function so that the value of the HYPERLINK function is evaluated by the T function. The resulting value is inserted into the Excel cell that the ADF component references.
Use the following syntax when writing an EL expression that invokes the HYPERLINK Excel function:
=T=HYPERLINKlink_location,friendly_name For example, the following EL expression uses HYPERLINK function to navigate to
http:www.oracle.com when end user clicks the component. =T=HYPERLINKhttp:www.oracle.com,
{bindings.ProductId.inputValue} If you write an EL expression using the HYPERLINK function, it is recommended that
you select the Locked checkbox in the Protection tab of the Format Cells dialog for the custom style that you apply to prevent error messages appearing.
Note: When the parent list is bound to a cell in the worksheet and
the child list is bound to an ADF Table Component column, the child list items are updated for all rows in the table when the end user
changes the parent list selection.