You can work in JDeveloper's IDE to develop and test run a Java application that is built with Oracle ADF Swing and Oracle ADF Business Components technologies.
Install the Schema: Download the schema zip file from OTN and install it. The cue cards use tables that are part of the Fusion Order Demo (FOD) schema.
Create a New Application: Use the Create Application wizard to create an application that uses the Java Desktop Application (ADF) template.
Create a Database Connection: Use the Create Database Connection dialog to create a connection to the schema.
Create Oracle ADF Business Components Objects: Use the Create Business Components from Tables wizard to create the business components that will provide access to data and implement the business logic.
Create an ADF Swing Form with Navigation: Use the Create ADF Swing Empty Form wizard to create a frame that contains code for enabling Oracle ADF data binding in the application. The frame is the databound Business Components client form that you will later run.
Create a Master Edit Form: Drag and drop a master collection from the Data Controls panel onto the client form, and then use the Create ADF Swing Edit Form wizard to create a master edit form panel for Orders records.
Create a Detail Table with Navigation: Use the Create ADF Swing Empty Panel wizard to create an empty panel. Then use the Data Controls panel to drag and drop a detail collection onto the panel to create a detail panel for viewing and browsing OrderItems records in a table format.
Add the Detail Panel to the Client Form: Complete the client form by dragging and dropping the detail panel onto the form.
Run the Application: Compile and run the application to see how the master-detail client form displays.
Customize the Form with Control Hints: Modify the view object's attributes using the Edit Attribute dialog, Control Hints section, to add meaningful labels for each attribute displayed on the master edit form.
Run the Application Again: Run the application to see how the client form displays after adding customized control hints.
The steps and examples in the cue cards are based on tables that are part of the Fusion Order Demo (FOD) schema. This schema is also used as the database for the sample application that ships with Oracle JDeveloper 11g, as well as other collateral in this release. It will be convenient to have this schema installed, and you only need to do it once. If you have already installed the FOD schema, you can skip this step and go directly to the next card. [ tell me more...]
jdeveloper.home, and all the
db.*settings). Keep all other properties set to their default values. The demo user must be named FOD.
/jdeveloperdirectory where you have JDeveloper installed, for example,
After running the Ant task, you should see a build successful message in the JDeveloper Log window. [ tell me more...]
The JDeveloper application is the highest level in the organizational structure. It stores information about the objects you are working with, while you are creating your application. It keeps track of your projects and the environment settings. [ tell me more...]
Application templates provide you with a quick way to create the project structure for standard applications with the appropriate combination of technologies already specified. The new application created from the template appears in the Application Navigator already partitioned into tiered projects, with the associated technology scopes set in each project. [ tell me more...]
When you complete the steps for creating a new application and project, the Projects panel in the Application Navigator should look like this: [ tell me more...]
You can connect to any database for which you have connection details, or install the sample schema used in the cue card examples and then establish a connection to it. If you installed the sample schema, you will be able to follow the steps in the cue cards exactly as written. If you work with your own database, you can supply your own values as needed. [ tell me more...]
FODfor the connection name and
fodfor the username.
When you complete the steps for creating a database connection, the Application Navigator should look similar to this when you expand the Application Resources panel. The database connection is now included as a resource for your application under the Connections | Database nodes. [ tell me more...]
Oracle ADF Business Components is a model layer technology in the Oracle Application Development Framework (Oracle ADF). Oracle ADF Business Components is a fully-featured, XML-based framework for creating business services. That is, it governs interaction between the rest of the application and the data stored in the data source, providing validation, specific services, and other business logic. [ tell me more...]
The Oracle ADF Business Components project requires a database connection that you will use to create business components from database objects. The database connection you specify will also be used by the Oracle ADF Business Components runtime to manage session facade failover and state management. [ tell me more...]
The Create Business Components from Tables wizard allows you to easily create a package of business domain components (entity objects, associations, and domains) from existing database objects and optionally to create a default package of data model components (view objects, view links, and an application module) from these newly generated business domain components. [ tell me more...]
After completing the Create Business Components from Tables wizard, the Model project in the Application Navigator should look similar to this: [ tell me more...]
In an Oracle ADF Business Components data model, a master-detail relationship is a foreign-key association between two or more view objects. When you create master-detail forms and tables using those view objects, end users will be able to drill down from a master collection to view (and optionally edit) the related data objects in the detail collection. [ tell me more...]
Formas the form name, and
viewas the package name. Confirm that Generate a Menu Bar is selected. Then click OK.
Oracle ADF Swing is a rich client technology in the Oracle Application Development Framework (Oracle ADF). Oracle ADF Swing is fully compatible with Java Swing and adds a thin layer to the client application so that standard Java components can work with the Oracle ADF data binding libraries. To enable ADF data binding in your Java client application, use the Create ADF Swing Empty Form dialog to generate a form that contains ADF-specific code. [ tell me more...]
The task of designing databound forms that coordinate with a back-end business service is accomplished declaratively with the Data Controls panel. The Data Controls panel affords the UI designer a hierarchical view of those business services that the application developer has registered with an instance of an Oracle ADF data control. [ tell me more...]
The Create ADF Swing Edit Form dialog simplifies creating a databound form by generating the code for the objects of the data collection you select. [ tell me more...]
A Java UI container uses a special object called a layout manager to control how components in the container are located and sized each time the container is displayed. A layout manager automatically arranges the components in the container according to a particular set of rules specific to that layout manager. Layout managers allow you to specify rules and constraints for the layout of your UI in a way that will be portable across platforms. [ tell me more...]
The edit form panel you added previously is created by JDeveloper using FormLayout in the data panel, as shown in the Structure window: [ tell me more...]
When you complete the steps for creating a master form in ADF Swing Form, the form in the Java visual editor should look similar to this: [ tell me more...]
In a master form, detail table, the role of the detail table is to display the individual data objects of the detail collection related to the current object in the master collection. The detail portion of the client form requires its own panel and layout manager, and can include a navigation bar for browsing objects in the detail collection. [ tell me more...]
OrderItemsPanelas the panel name, and accept
viewas the package name. Confirm that P anel , and both optional attributes are selected, then click OK.
The Create ADF Swing Empty Panel/InternalFrame dialog lets you create either an empty panel or internal frame. Select P anel to create an empty panel. In the dialog, the name you enter becomes the Java class that defines the panel for containing databound UI components. [ tell me more...]
The Data Controls panel affords the UI designer a hierarchical view of those business services that the application developer has registered with an instance of an Oracle ADF data control. The data control captures the master-detail relationships exposed by business service collections, and the Data Controls panel displays those relationships as parent and child nodes in the hierarchy. To create the detail portion of a master-detail page, always select a collection that constitutes a child node of the master collection node. If these parent-child nodes are not shown, then the business service that was registered with the ADF data control does not contain this relationship. [ tell me more...]
Because the detail portion of your client form will display a set of data objects in the detail collection, your panel needs to contain a collection-level UI control. The table control is ideally suited for this purpose. Each row of the table corresponds to a single data object, such as an order items record, where the attributes of each object correspond to the table columns. [ tell me more...]
When you complete the steps for creating a detail table in ADF Swing Panel, the panel in the Java visual editor should look similar to this: [ tell me more...]
In an ADF Swing application, forms rely on the ADF panel binding object to coordinate between the exposed collections. While it is possible to create a multiform application to display the master-detail forms and tables in separate windows, relying on a single window to display the data objects of both the master and the detail collections ensures that the client form shares a single panel binding instance. The process of creating a multiform application in ADF Swing, by contrast, requires additional code to manage the panel binding instance between both windows. [ tell me more...]
BorderLayout layout manager arranges a container's components in one of five areas within a BorderLayout, based on the
constraints property of the component: North, South, East, West, and Center. [
tell me more...]
When you complete the steps, the client form in the Java visual editor should look similar to this: [ tell me more...]
Oracle ADF control hints provide a centralized mechanism for any JavaBeans-based business service (including Oracle ADF Business Components) data item to be rendered in a consistent manner across all client types. This mechanism, known as control hints, permits application developers to centralize certain UI settings across clients and thereby to control many aspects of the way the UI interacts with the data item. Because they are set at the level of the business service, using control hints can also reduce the amount of UI coding in the Swing client. [ tell me more...]
Order Numberin the Label Text field. Click OK.
Instead of displaying the value from the attribute's heading, such as
OrderId, you can replace these with more meaningful labels for the user, such as
Order Number. [
tell me more...]
Date of Order,
Total Price, respectively.
When you complete the steps for customizing labels with control hints, the Model project in the Application Navigator should look similar to this: [ tell me more...]
Copyright © 1997, 2009, Oracle. All rights reserved.false ,,,,,,,,,,,,,,,