B ADF Desktop Integration EL Expressions

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:

B.1 Guidelines for Creating EL Expressions

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."

B.2 EL Syntax for ADF Desktop Integration Components

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

rowCount

Table

ROTable

Int

>=0

0

currentRowIndex

Table

ROTable

Int

>= 0 AND < RowCount (zero based index)

-1

currentRowMode

Table

String

"insert"

"update"

"unknown"

errors

Table

String

N/A

N/A

readOnly

Table.Column

Boolean

TRUE

FALSE

FALSE


Write EL expressions with the following syntax to retrieve:

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 AttributeNamePrefix and [TreeNodeID] is optional while * is required.

Table.Column

inputValue

""

B.3 Attribute Control Hints in ADF Desktop Integration

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

label

String

References the value of the label attribute control hint configured for an entity or view object.

updateable

Boolean

Returns true if the associated attribute binding is updatable.

readOnly

Boolean

This attribute control hint is unique to ADF Desktop Integration. Returns true if the associated attribute binding is not updatable.

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 ReadOnly property:

#{bindings.attributeID.hints.readOnly}

rather than:

=NOT(#{bindings.attributeID.hints.updateable})

Note that the attribute control hint readOnly property differs to the ReadOnly property of ADF Desktop Integration components described in Section A.1, "Frequently Used Properties in the ADF Desktop Integration."

mandatory

Boolean

Returns true if a value for the associated attribute binding is required.

dataType

String

Returns the data type of the attribute control hint. A Fusion web application can support many data types with complex names. The dataType attribute control hint was introduced in ADF Desktop Integration to simplify the writing of EL expressions. It maps the data types that a Fusion web application supports to the values supported by ADF Desktop Integration listed here:

  • string

  • number

  • date

  • boolean

  • other


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.