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.
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."
Install Oracle JDeveloper 11g and meet the installation prerequisites. The Fusion Order Demo application requires an existing Oracle database.
Install the Fusion Order Demo application from the Oracle Technology Network.
Install Mozilla FireFox, version 2.0 or higher, or Internet Explorer, version 7.0 or higher.
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.
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.
Open the application in Oracle JDeveloper:
From the JDeveloper main menu, choose Open from the File menu.
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."
In the Application Navigator, click the Application Resources accordion title to expand the panel.
In the Application Resources panel, expand the Connections and Database nodes.
Right-click the FOD connection, and choose Properties.
In the Edit Database Connection dialog, modify the connection information shown in Table 2-1 for your environment.
The host name for your database. For example:
The port for your database. For example:
The SID of your database. For example:
Do not modify the user name and password
fod/fusion. These must remain unchanged. Click OK.
In the Application Navigator, right-click Model and choose Rebuild.
In the Application Navigator, right-click ViewController and choose Run.
login.jspx page is displayed. Because of the way security is configured in this module, you must first log in.
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."
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.
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.
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
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
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
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.
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.