This tutorial explores the use of Oracle Application Development Framework (ADF) in Oracle Enterprise Pack for Eclipse (OEPE). It shows how to build a basic application using JPAs, task flow diagrams, JSF pages, page fragments, and regions.
show more or lessRead more...
Before you begin

Before starting this tutorial you should:

  1. Have access to an Oracle 11g database with the HR schema.

  2. Have access to or have installed Oracle Enterprise Pack for Eclipse (OEPE).

  3. Have access to or have installed Oracle WebLogic Server 10.3.6.

  4. If you already have access to Oracle Weblogic Server 10.3.6, download OEPE from Oracle Technology Network. Select either the Indigo or Juno version for your operating system. Unzip the file to a directory of your choice, which in this tutorial is referred to as ECLIPSE_HOME.

  5. If you need both OEPE and WLS 10.3.6, download oepe-wls-indigo- from Oracle Technology Network, selecting the appropriate version for your operating system.

    Install WebLogic into the directory of your choice, which in this tutorial is referred to as WEBLOGIC_HOME.

    Notice that OEPE supports ADF on WLS 10.3.4 and higher. However, this tutorial requires WLS 10.3.6. The WLS installation must have ADF installed and not all WLS installers include the ADF runtime. The OEPE OTN download page provides a WLS + OEPE + ADF installer, which will work for this tutorial. But you can download the ADF runtime installer separately from OTN. You can also download and install ADF from within the Eclipse IDE.

Purpose Duration Application
This tutorial shows you how to work with ADF using the Eclipse environment. To see the complete application you will create, click the Download button to download a zip of the finished application, and unzip it to your OEPE working folder. 3 hours Download HRApp.zip
Note: If you download the complete application, Show more or lessRead more...
Part 1: Configuring OEPE and WebLogic Server (WLS)
In this section of the tutorial, you open and configure Oracle Enterprise Pack for Eclipse (OEPE) for building an ADF application. You also configure a WLS domain to support your application.
Step 1: Launch Oracle Enterprise Pack for Eclipse

To start Oracle Enterprise Pack for Eclipse (OEPE), complete the following steps:

  1. To start Eclipse, double-click the eclipse.exe file found in the ECLIPSE_HOME directory where you installed Eclipse.

  2. alt text
  3. Eclipse starts loading and a Workspace Launcher dialog opens. Specify a Workspace folder for your work. In this sample we use D:/OepeWorkspace. Click OK to continue.

  4. alt text
  5. The Eclipse Welcome screen opens. On the Welcome screen, hover your mouse over each icon to review the possible options. You can take a tutorial, look at samples, get an overview of the Eclipse features, or take a look at what's new.

  6. alt text
  7. To start working, click the Workbench icon.

  8. alt text

    The Eclipse IDE opens.

    alt text
    The term Workbench refers to the desktop development environment. Show more or lessRead more...
Step 2: Configure the Working Perspective

To set the Workbench to your development needs, you use one of the predefined perspectives. A perspective defines the initial set of views and the layout of the Workbench window. Within the window, each perspective shares the same set of editors.

  1. Click the Open Perspective icon Opeen Perspective icon to select the appropriate perspective for your development needs.

  2. alt text
  3. Select Java EE from the drop-down list.

  4. alt text
  5. Notice that the Java EE perspective is now displayed.

  6. alt text
  7. Notice that the IDE updates to a new set of views and editors that are best suited to performing Java EE tasks.

  8. alt text
    One or more perspectives can exist in a single Workbench window. Show more or lessRead more...

    Perspectives can be opened either in the same (existing) Workbench window, which hides the current perspective, or in a new Workbench window. 

    Perspectives define visible action sets, which you can change to customize a perspective.

    You can save a perspective that you build in this manner, making your own custom perspective that you can open again later. 

    The Workbench displays the Resource perspective by default. This perspective shows views that are relevant to resource management.

  9. Review each of the tabs in the bottom section of the IDE. Later in the tutorial, you get a chance to explore the content of some of the tabs.

  10. alt text
  11. From the main menu, select Window > Show View to open or reopen specific views. Select Other.

  12. alt text
  13. In the Show View dialog box, expand the General node. Notice that views or editors that are already open are grayed out. Select the Palette view and click OK.

  14. alt text
  15. In the bottom pane, the Palette tab is added to your current environment. You can customize your environment by showing any views that you require.

  16. alt text
Step 3: Set Up WebLogic Server (WLS)

When developing your application, you need to have an application server defined so that you can deploy and run your application for testing purposes. You can deploy an ADF application to any supported application server, however this tutorial requires Oracle Weblogic Application Server.

  1. Click the Servers tab and then click the new server wizard link. This link opens the wizard that you use to define the server context for running, testing, and deploying the application. (You can also open the wizard by right-clicking inside of the Servers tab and selecting New > Server from the context menu.)

  2. alt text
  3. In the New Server Wizard, expand the Oracle node and select Oracle WebLogic Server 11gR1 (10.3.6). Type localhost as the server's host name and click Next.

  4. alt text
  5. Click the Browse icon Browse Icon next to the WebLogic home field.

  6. alt text
  7. In the Browse For Folder dialog box, select your WLS 10.3.6 home folder (for example, wlserver_10.3) and click OK.

  8. alt text
  9. If Java Persistence 2.0 is not already installed, under Server Extensions, click the Install link. Click Next.

  10. alt text
  11. In the Configuration area, next to the Domain directory field, click the Create icon Add icon  and select Create Domain from the pop-up list.


  12. alt text
  13. In the New WebLogic Domain dialog box, type adf_domain as the Name and select the Oracle JRF - 11.1.1.0 extension. Click Finish.


  14. alt text
  15. Click Finish again to create the new server.

  16. The status for the new WebLogic Server is displayed in the Servers tab. (Notice that the server is currently stopped.)


  17. alt text
Step 4: Define a Database Connection

This tutorial uses a database with the standard Oracle HR schema. In this tutorial you create objects that are based on the HR schema. The following steps describe how to create the design-time connection to the database. Later, when you deploy the application, you define a JDBC connection that is deployed with the application.

  1. Click the Data Source Explorer tab.

  2. alt text
  3. Right-click the Database Connections node and select New.

  4. alt text
  5. In the New Connection Profile Wizard, under Connection Profile Types, select Oracle Database Connection. Type HR as the name for the connection and click Next.

  6. alt text
  7. In the Specify a Driver and Connection Details page, enter the following values:

  8. Property Value
    SID XE, orcl... (the SID of your database)
    Host localhost (the name of your database host)
    Port number 1521
    User name hr
    Password hr
    Save password selected
    alt text
  9. Click Test Connection to validate the connection.

  10. alt text

    If the connection is unsuccessful, review the connection parameters and make sure the database is up and running. Make any necessary corrections or adjustments until the Ping test is successful.

  11. Click OK to acknowledge that the Ping test succeeded and then click Next.

  12. Review the connection summary page and then click Finish.

  13. alt text
  14. In the Data Source Explorer tab, expand the HR > XE (or your sid) > Schemas > HR > Tables nodes. You should see the following list of tables:

  15. alt text
  16. Right-click the Tables node and select Show in Schema Viewer.

  17. alt text
  18. Notice that selecting this option creates a diagram of the HR schema that shows table names, column names, column types, keys, and relationships between tables.

  19. alt text
  20. In the Outline tab (in the right pane), move the blue transparent window to display other areas of your diagram.

  21. alt text
  22. Close the HR Diagram tab.

  23. alt text


Bookmark Print Expand all | Hide all
Back to top
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.