This appendix describes the syntax for EL expressions in ADF Desktop Integration and provides guidelines for writing EL expressions.
This appendix includes the following sections:
Section B.2, "EL Syntax for ADF Desktop Integration Components"
Section B.3, "Attribute Control Hints in ADF Desktop Integration"
The following list describes the characteristics that EL expressions for your integrated Excel workbook can have and provides recommendations for writing EL expressions:
Literal values that evaluate correctly to the type expected for the Oracle ADF component property. The following list describes some examples:
Boolean values true
and false
Integer values such as -1
, 0
, and 100
String values such as hello world
Strings that contain one or more valid EL expression parts. The following list shows examples of valid syntax:
#{row.bindings.ProductId.inputValue}
#{components.TAB416222534.errors}
#{res['excel.saveButton.label']}
A valid Excel formula. An Excel formula string must start with the =
character. If the literal string includes an #{...}
expression, ADF Desktop Integration evaluates this expression first and inserts the resulting value into the Excel formula string. Excel then evaluates the Excel formula.
Note the following points if you write an EL expression:
Excel formula elements must not be used inside an #{...}
expression.
EL expressions should not contain references to Excel cells because EL expressions are managed within ADF configuration. Excel cannot update the ADF configuration if the referenced cell moves. A workaround is to define a named cell reference or range using the Name box in the Excel Formula Bar. You can reference the named cell reference or named cell range reference from an EL expression. For information about defining named cell references or ranges, see Excel's documentation.
EL expressions in a page definition file
For information about the syntax that you use to write EL expressions in a page definition file, see Section 4.3, "Working with Page Definition Files for an Integrated Excel Workbook."
Table B-1 lists supported expression properties for the ADF Desktop Integration components that support EL expressions.
The EL expressions use the following syntax to reference these properties:
#{components.
componentID.property
}
where componentID
references the ID of the component and property
references the property (for example, rowCount
).
Table B-1 Expression Properties for ADF Desktop Integration Components
Property | Component Type | Property Type | Expected Runtime Values | Value at Design Time |
---|---|---|---|---|
|
Table ROTable |
Int |
>=0 |
0 |
|
Table ROTable |
Int |
>= 0 AND < RowCount (zero based index) |
-1 |
|
Table |
String |
"insert" "update" |
"unknown" |
|
Table |
String |
N/A |
N/A |
|
Table.Column |
Boolean |
TRUE FALSE |
FALSE |
Write EL expressions with the following syntax to retrieve:
Worksheet errors at runtime
#{worksheet.errors}
For more information about worksheet errors, see Section 12.4, "Error Reporting in an Integrated Excel Workbook."
Workbook initialization parameters
#{workbook.params.
parameterName
}
where parameterName
is the name of the workbook initialization parameter. For information about using these parameters, see Section 14.5, "Passing Parameter Values from a Fusion Web Application Page to a Workbook."
Resource bundle string key values
#{
resourceBundleAlias
['
resourceBundleKey
']}
where resourceBundleAlias
is the alias of the resource bundle and resourceBundleKey
is the string key value. For more information about resource bundles, see Section 10.2, "Using Resource Bundles in an Integrated Excel Workbook."
Table B-2 describes the supported syntax and properties for Oracle ADF control bindings. For information about the attribute control hints (controlHint
) that ADF Desktop Integration supports, see Table B-3.
You can use the expression builder described in Section 5.8, "Using the Expression Builder" to generate some of the EL expressions described in Table B-2. You have to write some other EL expressions as indicated in Table B-2.
Table B-2 Expression Properties and Syntax for Oracle ADF Control Bindings
Syntax | Component Type | Object Property | Value at Design Time |
---|---|---|---|
Use the expression builder to generate EL expressions with the following syntax: #{bindings.attributeID} #{bindings.attributeID.label} #{bindings.attributeID.hints.controlHint} You can also write the previous EL expressions in addition to the following EL expression:
#{bindings.attributeID.inputValue}
|
Attribute |
Attribute control hint |
"" |
Use the expression builder to generate EL expressions with the following syntax: #{bindings.ListID} #{bindings.ListID.label} #{bindings.ListID.hints.controlHint} |
List |
Attribute control hint |
"" |
Write EL expressions with the following syntax for a column in a table-type component
#{row.bindings.attributeID.inputValue}
Write an EL expression with the following syntax when adding a dynamic column to an ADF Table component as described in Section 7.15, "Adding a Dynamic Column to Your ADF Table Component": #{bindings.TreeID.[TreeNodeID].AttributeNamePrefix*.inputValue} #{bindings.TreeID.AttributeNamePrefix*.inputValue} #{bindings.TreeID.[TreeNodeID].hints.AttributeNamePrefix*.controlHint} #{bindings.TreeID.[TreeNodeID].hints.AttributeNamePrefix*.label} A value for |
Table.Column |
inputValue |
"" |
ADF Desktop Integration can read the values of the attribute control hint names described in Table B-3. You write EL expressions that ADF Desktop Integration uses to retrieve the value of an attribute control hint from your Fusion web application. Table B-2 describes the EL expression syntax that retrieves the values of attribute control hints at runtime.
You configure attribute control hints in your Fusion web application. Information about how to add an attribute control hint to an entity object can be found in the "Defining Attribute Control Hints for Entity Objects" section of the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework. Information about how to add an attribute control hint to a view object can be found in the "Defining Attribute Control Hints for View Objects" section of the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.
Table B-3 Attribute Control Hints Used by ADF Desktop Integration
Attribute Control Hint | Type | Value to configure in the Fusion web application |
---|---|---|
|
String |
References the value of the label attribute control hint configured for an entity or view object. |
|
Boolean |
Returns |
|
Boolean |
This attribute control hint is unique to ADF Desktop Integration. Returns To optimize the performance of an integrated Excel workbook when it evaluates Excel formulas in EL expressions, it is recommended that you write an EL expression with the following syntax for a component's
#{bindings.attributeID.hints.readOnly}
rather than:
=NOT(#{bindings.attributeID.hints.updateable})
Note that the attribute control hint |
|
Boolean |
Returns |
|
String |
Returns the data type of the attribute control hint. A Fusion web application can support many data types with complex names. The
|
The ADF Desktop Integration attribute control hints are based on information available in the web application's model configuration. ADF Desktop Integration supports view object or entity object hint values, but does not support programmatic overrides of hint values if they are calculated at a row-by-row level at runtime.