Skip Headers
Oracle® Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework
11g Release 2 (11.1.2.0.0)

Part Number E16182-01
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

H Data Controls in Fusion Web Applications

This appendix provides a brief description of the various types of data controls available for Fusion web applications built with Oracle ADF. It also presents a brief comparison of how data access features are implemented for each type of data control.

This appendix contains the following sections:

H.1 Introduction to Data Controls

A data control is essentially a bridge that makes data from a source available to the user interface in a Fusion web application. You can use the objects in the data control to create databound user interface components.

The most commonly used types of data controls include the following:

H.2 Data Control Feature Implementation Comparison

The type of data control that you choose to use will impact how you implement data access features. Table H-1 provides a comparison of how you implement some commonly used data access features for each type of data control.

Table H-1 Comparison of Feature Implementation in Data Controls


ADF Business Components Data Control JavaBean Data Control EJB Data Control Web Services Data Control URL Service Data Control JMX Data Control Placeholder Data Control

af:Query

Declarative

Declarative

Declarative

Implemented programmatically

Not available

Not available

Not available

af:quickQuery

Declarative

Declarative

Declarative

Implemented programmatically

Not available

Not available

Not available

af:inputComboListOfValues

Declarative

Declarative

Declarative

Implemented programmatically

Not available

Not available

Declarative

af:Calendar

Declarative

Implemented programmatically

Implemented programmatically

Implemented programmatically

Not available

Not available

Not available

af:Media

Declarative

Implemented programmatically

Implemented programmatically

Implemented programmatically

Not available

Not available

Not available


The features that are listed in the table as "implemented programmatically" can be implemented using the necessary Java classes required to implement a business model that can be used by the specific data-entry component. For more information, refer to the Javadoc for the appropriate classes.

H.3 Data Control Objects

In the Data Controls panel, each data control object is represented by an icon. Table H-2 describes what each icon represents, where it appears in the Data Controls panel hierarchy, and what components it can be used to create.

You can design a databound user interface by dragging an item from the Data Controls panel and dropping it on a page as a specific UI component.

The objects described in Table H-2 are applicable to the JavaBean data control, the EJB data control, and the JMX data control, unless otherwise noted. For information about the data control objects available in the other types of data controls, refer to the documentation for the desired type of data control, as listed in Section H.1, "Introduction to Data Controls."

Table H-2 Data Controls Panel Icons and Object Hierarchy for JavaBeans and EJBs

Icon Name Description Used to Create...

Data control icon

Data Control

Represents a data control. You cannot use the data control itself to create UI components, but you can use the child objects listed under the data control. There may be more than one data control, each representing a logical grouping of data functions.

Typically, there is one data control for a given source (bean or EJB). However, you may have additional data controls that were created for other types of objects (for example, application modules or web services).

Serves as a container for the other objects. Not used to create anything.

Create method icon.

Create Method

Represents a built-in method that creates a new instance of an object in a data collection using the new Java constructor call. Create method icons are located in a node named after the data collection to which they belong. These data collection nodes are located in the Constructors node under the data control. The Attributes node, which appears as a child under a create method, contains all the attributes of the data collection. If the collection contains an attribute from another collection (called a foreign key in relational databases), that attribute is represented by an accessor return icon. In this case, the accessor returns a single object.

This object is not available in the JMX data control.

Creation forms.

Method icon

Method

Represents a custom method on the data control that may accept parameters, perform some action or business logic, and return data or data collections. If the method is a get method of a map and returns a data collection, a method return icon appears as a child under it. If a method requires a parameter, a folder appears under the method, which lists the required parameters.

UI actions such as buttons or links.

Method return icon.

Method Return

Represents a data collection that is returned by a custom method. A method return appears as a child under the method that returns it. The objects that appear as children under a method return may be attributes of the collection, accessor returns that represent collections related to the parent collection, other methods that perform actions related to the parent collection, and operations that can be performed on the parent collection.

Forms, tables, trees, and range navigation components.

Accessor return icon.

Accessor Return

Represents an object returned by a bean-style accessor method on the business service. An accessor method is used when the objects returned are JavaBeans. Accessor returns appear as children under method returns, other accessor returns, or in the Attributes node under built-in create methods. Accessor returns are objects that are related to the current object in the parent collection. This relationship is usually based on a common unique attribute in both objects. For example, if a method returns a collection of users, an accessor return that is a child of that collection might be a collection of service requests that are assigned to a particular user. In ADF, the relationship between parent and child collections is called a master-detail relationship. For more information about master-detail objects, see Chapter 29, "Displaying Master-Detail Data.".

Accessor returns can be either collections or single objects. For example, if a method returns a collection of service requests, one accessor return under that method might be a collection of service history details for the current service request, while another accessor return might be a single user assigned to the current service request. By default, when data controls are created from session beans over POJOs, the names of accessors that return collections end in Collection (for example, OrderCollection). The UI components available from the Data Controls panel context menu differ depending on whether the accessor return is a collection or a single object.

The children under an accessor return may be attributes of the collection or object, other accessor returns, custom methods that return a value from the collection or object, and operations that can be performed on the collection or object. The accessor returns under a built-in create method are always a single object and never have any children.

For collections: Forms, tables, trees, range navigation components, and master-detail widgets.

For single objects: Forms, master-detail widgets, and selection lists.

For single objects under a constructor: selection lists only.

Attribute icon.

Attribute

Represents a discrete data element in an object. Attributes appear as children under method returns or accessor returns.

Label, text field, and selection list components.

Data control operation icon.

Operation

Represents a built-in data control operation that performs actions on the parent object. If an operation requires a parameter, a folder appears under the method, which lists the required parameters. Data control operations are located in an Operations node under method returns or accessor returns and under the root data control node. The operations that are children of a particular method or accessor return operate on that return object only, while operations under the data control node operate on all the objects represented by the data control.

UI actions such as buttons or links.

Parameter icon.

Parameter

Represents a parameter value that is declared by the method or operation under which it appears. Parameters appear in a folder under a method or operation.

Label, text, and selection list components.