In a J2EE application that uses the Oracle ADF model, model data is surfaced to the view and controller layers through data control objects implemented for each type of data provider. A model-specific set of data controls:
Once the data is surfaced by data control adapter classes, interaction with the business service by the J2EE application is possible by any method that acts on or retrieves data from data objects and collections (also described as rows and row sets).
At runtime, the interaction with the business services initiated from the client or controller is managed by the application through a single object known as the Oracle ADF model binding context. The ADF binding context is a container object that defines a hierarchy of data controls and data binding objects derived from the Oracle ADF model layer, as shown in the following figure.
The binding context defines these hierarchies, whose objects reference one another in order to allow the Oracle ADF model to service the controller and view layers.
This hierarchy for the data controls looks like this:
The hierarchy for the data binding objects, which also start from the same parent container, looks like this:
and, additionally:
The following diagram depicts binding container containment hierarchy in detail. Note that the definition of the binding context and the data binding objects available to the application are specified by XML-based files at the level of the client project.
Through the iterator binding's object hierarchy path, the iterator binding accesses the data collection and iterates over its data objects. In constrast, value binding objects allow UI components to display or update the current data object of the collection being iterated over.
For example, in the source of the web page or Java panel, a UI component's value binding definition references the page or panel's iterator binding object. The iterator binding object, in turn, references the data controls, which complete the data-access path and allow the Oracle ADF model to traverse the object hierarchy:
Note: The above description has been simplified to include both web applications and Java client applications. In an actual web application, the controller layer is responsible for populating the Oracle ADF model binding context prior to dispatching to the view layer. Then, following the pull model for interactive web applications, the view layer pulls the data to render values in the page.
The definition of the binding context and the data binding objects available to the application are specified by XML-based files at the level of the client project as described in the following section.
Using the JDeveloper design time, the application developer creates a set of XML files that declaratively define the ADF bindings and data controls. At runtime, the application creates the Oracle ADF binding context from the files in the application, as shown in the following figure.
The client binding description file (.cpx
) references the
binding definitions in the client binding container definition files (
.xml
). The .cpx
file also contains a reference to the data
control description file (.dcx
), which specifies the data
control factory to use for a specific business service. For a more
complete description of these files, see
About the ADF-Specific Project Files.
The design time supports creating these files through your interaction
with the Data Control Palette, visual editor, the Structure window, and
the Property Inspector. After you use the Data Control Palette to insert
a databound UI component into the displayed web page or JClient panel,
the binding definition is created in the document's binding definition
file. Additionally, source code is added to the document that references
the binding objects, which the application makes available through the
ADF binding context bindings
namespace.
For more information about these design time tools, see About the Design Time for Oracle ADF.
Specifically, these objects in the ADF model layer provide runtime access to business services:
oracle.adf.model.BindingContext
)
binding
.
oracle.adf.model.binding.DCDataControl
)
oracle.adf.model.binding.DCBindingContainer
)
oracle.adf.model.binding.DCIteratorBinding
)
oracle.jbo.uicli.binding.JUControlBinding
)
oracle.jbo.uicli.binding.JUCtrlActionBinding
)
For information about the data controls in Oracle ADF:
To customize the data bindings:
To understand the process for creating either Model 1 or Model 2-style web applications in detail:
Copyright © 1997, 2004, Oracle. All rights reserved.