Oracle Designer Tutorial


Prev Next

Lesson 10
Generate a Web Application

The Oracle Web PL/SQL Generator creates fully functional web applications that enable users to query, update, delete and enter information in an Oracle database over the world wide web. In this lesson, you learn how to generate basic web applications.

Note: You can follow this lesson only if Oracle's Web PL/SQL Generator has been installed and a web server is available. You will need a username, password and connect string for the web server, and these may be different to those you have been using for the previous lessons. You will also need to know the full path of a web browser executable and the web agent URL. Your System Administrator will be able to tell you these if Web PL/SQL Generator has been set up.

Implement the Speedy Pizza system as a web application

In lesson 1 you created a process step called "Add new product to the menu". You progressed this process step as part of the Speedy Pizza system and implemented it as a form. In this lesson, you will implement the same process as a web application.

Objective

To implement part of the Speedy Pizza system as a web application.

Instructions

  1. In the Design Editor, in the list of relational table definitions on the Modules or Server Model tabs, highlight all the table names and select Generatearrow.gif (182 bytes)Generate Table API.

    This opens the Generate Table API dialog.

    Generate Table API; Target tab

  2. Select the Database option button and enter the connection details if these are not already shown.

  3. Click the Start button.

    The Design Editor message window is opened, through which progress is reported.

  4. When generation of the table API is complete, close the message window .

  5. In the Navigator, expand the Modules node and highlight the module with the name set to "Add new product to the menu".

  6. Select Utilitiesarrow.gif (182 bytes)Copy With New Language. This opens the Copy With New Language dialog box.

    Copy With New Language dialog box

  7. Enter TUTORI0060 in the New Short Name box and select [...]/Web PL/SQL from the New Language drop-down list, then click the OK button. The new module is listed in the Navigator.

  8. Create a module diagram for the TUTORI0060 module.

  9. Display the Property Palette, set the Insert? property to NO for the following bound items and then save the changes:

    Priced_Products (Base table) Products (Lookup table)
    PP_ID DISCOUNT_DAY
      PRODUCT_DESCRIPTION
      PRODUCT_ID
      PRODUCT_TYPE

  10. Select Optionsarrow.gif (182 bytes)Generator Optionsarrow.gif (182 bytes)Web PL/SQL and use the connection information supplied by your System Administrator to complete the dialog. Check the "Auto-install after Generation" check box. For a full description of the details to be entered into the Options dialog box, click the Help button. Click the OK button to save the information and close the dialog box.

  11. Highlight module TUTORI0060 in the Navigator (or on the module diagram) and select Generategifs/arrow.gifGenerate Module. This opens the Generate Web PL/SQL dialog box.

  12. Click the Start button.

    Progress is reported in the message window.

  13. When the "Generation is complete" message box is displayed, click the OK button.

  14. On the message window toolbar, click the List Actions button.

    List Actions button

  15. Highlight "Run generated application using browser..." and click the Run button.

    Your browser executable is opened and the generated application is shown.

    The first page of the web application is a query form. Click the New button to move to the "add new product to menu" functionality (the Priced Products page).

    Just as with the Forms application, the first field you fill in is Product Id. This is the identity of the product (e.g., 1011 for a Seafood Special pizza) that forms the basis of the new menu item.

    Enter one of the active Product Ids in the List Of Values table to add it to the Priced Products page. Fill in the other fields to describe the new menu item, then click the Insert button to create the record.


Lesson summary

In this lesson you created module TUTORI0060 and implemented it as a web application.



Next

Prev

Next

oracle.gif (1205 bytes) 
Copyright © 2000 Oracle Corporation.  
All Rights Reserved.