About the Properties of the ADF Bindings
When you create a databound component using the Data Control Palette, JDeveloper adds metadata to the UIModel.xml file defined for your view-controller project. The metadata determines the default display characteristics of each databound UI component and sets properties for the binding object at runtime. You can work with the data binding metadata through:
Additionally, each binding's implementing class defines methods that give you access to runtime information about the binding. You can work with runtime-specific properties through:
The following sections describe the runtime properties for each Oracle ADF binding type:
- Generic properties for all action and value bindings
- Action binding properties
- Attribute binding properties
- Boolean binding properties
- Iterator binding properties
- List binding properties
- Range binding properties
- Scroll binding properties
Generic Runtime Properties for All Action and Value Bindings
The oracle.jbo.uicli.binding.DCControlBinding class provides accessor methods for these properties that are accessible by all value bindings:
- error - Returns any cached exception which was raised during the invocation of the method or action to which the binding is bound.
- fullName - Returns the fully qualified name of the binding object in the Oracle ADF binding context.
- iteratorBinding - Returns the iterator binding that provides access to the data collection.
- name - Returns the name of the binding object in the context of the binding container to which it is registered.
- rowKeyStr - Returns the key of the data collection. The key specifies the location of the data object and is returned in its String format.
Action Binding Runtime Properties
The oracle.jbo.uicli.binding.JUCtrlActionBinding class provides accessor methods for these properties of method-type action bindings that you can work with:
- params - Returns a list of parameter values that is passed to the method to which the action is bound.
- paramsMap - Returns a map of parameter values. The map is converted into an ordered list, where the keys on the map are names of the parameters, specified at design time as metadata.
- result - Returns the result of the method invocation. The method must return an object.
And you can work with the generic properties defined by the root class DCControlBinding .
Attribute Binding Runtime Properties
The oracle.jbo.uicli.binding.JUCtrlAttrsBinding class defines no properties of its own.
However, you can work with these properties defined by the class hierarchy of the attribute binding:
- attributeValue - Returns the value of the first attribute to which the binding is associated.
- attributeValues - Returns the value of all the attributes to which the binding is associated in an ordered array.
- attributeDef - Returns the attribute definition for the first attribute to which the binding is associated.
- attributeDefs - Returns the attribute definitions for all the attributes to which the binding is associated.
- displayHint - Returns the display hint for the first attribute to which the binding is associated. The hint identifies whether the attribute should be displayed or not.
- inputValue - Returns the value of the first attribute to which the binding is associated. If the binding was used to set the value on the attribute and the set operation failed, this method returns the invalid value that was being set.
- label - Returns a map of labels keyed by attribute name for all attributes to which the binding is associated.
- labels - Returns the label for the first attribute of the binding.
- labelSet - Returns an ordered set of labels for all the attributes to which the binding is associated.
- mandatory - Returns whether the first attribute to which the binding is associated is required.
- tooltip - Returns the tooltip hint for the first attribute to which the binding is associated.
- updateable - Returns whether the first attribute to which the binding is associated is updateable.
And you can work with the generic properties defined by the root class DCControlBinding .
Boolean Binding Runtime Properties
However, you can work with these properties defined by the class hierarchy of the Boolean binding:
- attributeValue - Returns the value of the first attribute to which the binding is associated.
- attributeValues - Returns the value of all the attributes to which the binding is associated in an ordered array.
- attributeDef - Returns the attribute definition for the first attribute to which the binding is associated.
- attributeDefs - Returns the attribute definitions for all the attributes to which the binding is associated.
- displayData - Returns a list of map elements. Each map entry contains the following elements:
- selected - A boolean TRUE if current entry should be selected.
- index - The index value of the current entry.
- prompt - A concatenated string of all display attribute values for the current entry.
- displayValues - The iterator of display attribute values.
- selectedIndex - The index of the selected entry to which the binding is associated.
- label - The label to display for the current attribute
- tooltip - The tooltip to display for the current attribute
- displayHint - The display hint for the current attribute
- displayHeight - The height in lines for the current attribute
- displayWidth - The width in characters for the current attribute
- controlType - The control type hint for the current attribute
- format - The format to be used for the current attribute
And you can work with the generic properties defined by the root class DCControlBinding .
Iterator Binding Runtime Properties
The oracle.jbo.uicli.binding.JUIteratorBinding class abstracts out the most commonly used methods for collection and currency management:
- error - Returns any exception that was cached while validating the changes made to data through the iterator or through any Oracle ADF data control associated with the iterator.
- estimatedRowCount - Returns the maximum row count of the rows in the collection with which this iterator binding is associated.
- name - Returns the name of this iterator binding.
- rangeSize - Returns the range size of an Oracle ADF Business Components row set iterator. This property is limited to data controls registered with ADF Business Components. The rangeSize property of the iterator binding overrides the range size setting on the ADF Business Components view object. Note: If you want to change the range size setting on a row set iterator through an iterator binding, you must use the setRangeSize() method call on the iterator binding object and not on the view object.
- rowAtRangeIndex - Returns the data object at the specified index of the collection. In the case of data controls registered with Oracle ADF Business Components, it returns the row of the index in the current range.
List Binding Runtime Properties
The oracle.jbo.uicli.binding.JUCtrlListBinding class provides accessor methods for these properties that you can work with:
- displayData - Returns a list of map elements. Each map entry contains the following four elements:
- selected - A boolean TRUE if current entry should be selected.
- Index - The index value of the current entry.
- Prompt - A concatenated string of all display attribute values for the current entry.
- displayValues - The iterator of display attribute values.
- selectedIndex - The index of the selected entry to which the binding is associated.
- label - The label to display for the current attribute.
- tooltip - The tooltip to display for the current attribute.
- displayHint - The display hint for the current attribute.
- displayHeight - The height in lines for the current attribute.
- displayWidth - The width in characters for the current attribute.
- controlType - The control type hint for the current attribute.
- format - The format to be used for the current attribute.
Additionally, you can work with these properties defined by the class hierarchy of the list binding:
- attributeValue - Returns the value of the first attribute to which the binding is associated.
- attributeValues - Returns the value of all the attributes to which the binding is associated in an ordered array.
- attributeDef - Returns the attribute definition for the first attribute to which the binding is associated.
- attributeDefs - Returns the attribute definitions for all the attributes to which the binding is associated.
- displayHint - Returns the display hint for the first attribute to which the binding is associated. The hint identifies whether the attribute should be displayed or not.
- inputValue - Returns the value of the first attribute to which the binding is associated. If the binding was used to set the value on the attribute and the set operation failed, this method returns the invalid value that was being set.
- label - Returns a map of labels keyed by attribute name for all attributes to which the binding is associated.
- labels - Returns the label for the first attribute of the binding.
- labelSet - Returns an ordered set of labels for all the attributes to which the binding is associated.
- mandatory - Returns whether the first attribute to which the binding is associated is required.
- tooltip - Returns the tooltip hint for the first attribute to which the binding is associated.
- updateable - Returns whether the first attribute to which the binding is associated is updateable.
And you can work with the generic properties defined by the root class DCControlBinding .
Range Binding Runtime Properties
The oracle.jbo.uicli.binding.JUCtrlRangeBinding class provides accessor methods for these properties that you can work with:
- estimatedRowCount - Returns the maximum row count of the rows in the collection with which this iterator binding is associated.
- rangeSet - Returns a list of map elements over the range of rows from the
associated iterator binding. The elements in this list are wrapper objects over the indexed row in the range that restricts access to only the attributes to which the binding is bound. The properties returned on the reference object are:
- index - The range index of the row this reference is pointing to.
- key - The key of the row this reference is pointing to.
- keyStr - The String format of the key of the row this reference is pointing to.
- currencyString - The current indexed row as a String. Returns "*" if the current entry belongs to the current row; otherwise, returns " ". This property is useful in JSP applications to display the current row.
- attributeValues - The array of applicable attribute values from the row.
And you may also access an attribute value by name on a range set like rangeSet.Dname if Dname is a bound attribute in the range binding.
Additionally, you can work with these properties defined by the class hierarchy of the range binding:
- attributeValue - Returns the value of the first attribute to which the binding is associated.
- attributeValues - Returns the value of all the attributes to which the binding is associated in an ordered array.
- attributeDef - Returns the attribute definition for the first attribute to which the binding is associated.
- attributeDefs - Returns the attribute definitions for all the attributes to which the binding is associated.
- displayHint - Returns the display hint for the first attribute to which the binding is associated. The hint identifies whether the attribute should be displayed or not.
- inputValue - Returns the value of the first attribute to which the binding is associated. If the binding was used to set the value on the attribute and the set operation failed, this method returns the 'invalid' value that was being set.
- label - Returns a map of labels keyed by attribute name for all attributes to which the binding is associated.
- labels - Returns the label for the first attribute of the binding.
- labelSet - Returns an ordered set of labels for all the attributes to which the binding is associated.
- mandatory - Returns whether the first attribute to which the binding is associated is required.
- tooltip - Returns the tooltip hint for the first attribute to which the binding is associated.
- updateable - Returns whether the first attribute to which the binding is associated is updateable.
And you can work with the generic properties defined by the root class DCControlBinding .
Scroll Binding Runtime Properties
However, you can work with the generic properties defined by the root class DCControlBinding .
To read about data bindings:
To customize data bindings:
- Customizing ADF Bindings in the Design Time Editors
- Setting Properties of ADF Bindings in Expressions
For information about the binding context in Oracle ADF: