2 Introduction to the Oracle Fusion Order Demo Sample Application

This chapter describes the Oracle Fusion Order Demo sample application, how to set it up, and how to run the Suppliers Module.

This chapter includes the following sections:

The instructions in this chapter are for setting up and running the sample application on Oracle WebLogic Server. Oracle WebCenter Content can also be deployed to an IBM WebSphere Application Server. For more information, see "Managing Oracle WebCenter Content on IBM WebSphere" in the Oracle Fusion Middleware Third-Party Application Server Guide.

2.1 About Fusion Order Demo and the Suppliers Module

In the Oracle Fusion Order Demo sample application, electronic devices are sold through a storefront web application. Customers can visit the website, register, and place orders for products.

To view and run the demo, you need to install Oracle JDeveloper 11g. Then you need to download the application for the demonstration. For instructions to complete these tasks, see Section 2.2, "Setting Up the Fusion Order Demo Application."

After the application is installed and running, you can view the code using Oracle JDeveloper. You can view the application at runtime by logging in as an existing customer and placing an order.

The Suppliers module of Fusion Order Demo demonstrates the use of Java EE to create web applications for a web supplier management system. The demonstration application is used to illustrate points and provide code samples.

The Suppliers module consists of a business services project named Model and a web user interface project named ViewController. You run the Suppliers module of the Fusion Order Demo application in JDeveloper by running the ViewController project. The ViewController project uses JavaServer Faces (JSF) as the view technology, and the project relies on the ADF Model layer to interact with the EJBs in the Model project. To learn more about the Suppliers module and to understand its implementation details, see Section 2.3.1, "Suppliers Module Code" and Section 2.3.2, "Suppliers Module Pages."

2.2 Setting Up the Fusion Order Demo Application

The Fusion Order Demo application runs using an Oracle database and Oracle JDeveloper 11g. The platforms supported are the same as those supported by JDeveloper.

To set up the Fusion Order Demo application:

  1. Install Oracle JDeveloper 11g and meet the installation prerequisites. The Fusion Order Demo application requires an existing Oracle database.

  2. Install the Fusion Order Demo application from the Oracle Technology Network.

  3. Install Mozilla FireFox, version 2.0 or higher, or Internet Explorer, version 7.0 or higher.

  4. Run the application on a monitor that supports a screen resolution of 1024 X 768 or higher.

For more information, see "Setting Up the Fusion Order Demo Application" in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

2.3 Running the Suppliers Module

To run the Suppliers module of the Fusion Order Demo application:

  1. Download and install the Fusion Order Demo application as described in "Setting Up the Fusion Order Demo Application" in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

  2. Open the application in Oracle JDeveloper:

    1. From the JDeveloper main menu, choose Open from the File menu.

    2. Navigate to the location to which you extracted the demo ZIP file, select the SupplierModule_2.0.jws application workspace from the SupplierModule directory, and click Open.

      Figure 2-1 shows the Application Navigator after you open the file for the application workspace. For a description of each of the projects in the workspace, see Section 2.3.1, "Suppliers Module Code."

      Figure 2-1 The Suppliers Module Projects in Oracle JDeveloper

      FOD application project folders
  3. In the Application Navigator, click the Application Resources accordion title to expand the panel.

  4. In the Application Resources panel, expand the Connections and Database nodes.

  5. Right-click the FOD connection, and choose Properties.

  6. In the Edit Database Connection dialog, modify the connection information shown in Table 2-1 for your environment.

    Table 2-1 Connection Properties Required to Run the Fusion Order Demo Application

    Property Description

    Host Name

    The host name for your database. For example:

    localhost

    JDBC Port

    The port for your database. For example:

    1521

    SID

    The SID of your database. For example:

    ORCL or XE


    Do not modify the user name and password fod/fusion. These must remain unchanged. Click OK.

  7. In the Application Navigator, right-click Model and choose Rebuild.

  8. In the Application Navigator, right-click ViewController and choose Run.

    The login.jspx page is displayed. Because of the way security is configured in this module, you must first log in.

  9. Enter SHEMANT for User Name and welcome1 for Password.

Once you log in, the browse page appears, which allows you to search for products. Once you select a product in the results table, you can edit or remove the product information. Using the command links at the top of the page, you can edit the corresponding supplier's information, or add a new supplier. For more information about the Suppliers module at runtime, see Section 2.3.2, "Suppliers Module Pages."

2.3.1 Suppliers Module Code

Once you have opened the projects in Oracle JDeveloper, you can then begin to review the artifacts within each project. The Model project contains the Java classes and metadata files that allow the data to be displayed in the web application. The oracle.fodemo.common project contains components used by multiple classes in the application. The oracle.fodemo.supplier project contains the components used to access the supplier data. Figure 2-2 shows the Model project and its associated directories.

Figure 2-2 The Model Project in JDeveloper

Directories in the Model project

The ViewController project contains the files for the web interface, including the backing beans, deployment files, and JSPX files. The Application Sources node contains the code used by the web client, including the managed and backing beans, property files used for internationalization, and the metadata used by Oracle ADF to display bound data. The Web Content node contains web files, including the JSP files, images, skin files, deployment descriptors, and libraries. Figure 2-3 shows the ViewController project and its associated directories.

Figure 2-3 The ViewController Project in JDeveloper

Directories in the ViewController project

2.3.2 Suppliers Module Pages

The Supplier module contains eight main pages that enable a user to perform these tasks:

  • Search for products: The browse.jspx page enables a user to search for products. Search results are displayed in a table. Figure 2-4 shows the search form on the browse page.

    Figure 2-4 Search Form in Supplier Module

    Search form in supplier module
  • Edit row data in a table: From the table on the browse.jspx page, a user can select a product and choose Update to navigate to the productInfo.jspx page (clicking the product link also navigates to this page). From the table, a user can also click Remove, which launches a popup window that allows the removal of the selected product. Figure 2-5 shows the table on the browse page.

    Figure 2-5 Table on the browse Page

    Table on the browse page
  • Edit row data in a form: From the productInfo.jspx page, a user can change the data for a row. A selection list contains valid values for the product status. The Choose File button enables a user to upload a graphic file, which is then displayed below the form. Figure 2-6 shows a productInfo.jspx page.

    Figure 2-6 Product Details Page

    Product Details page
  • The Add Supplier link takes the user to a series of pages contained within the regisrationDetails.jspx page that are used to create a new supplier, as shown in Figure 2-7.

    Figure 2-7 Create a Supplier Train

    Create a Supplier train
  • Log in to the application: The login.jspx page allows users to log in to the application. For more information, see "Enabling ADF Security in a Fusion Web Application" in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.