Oracle Designer Tutorial


Prev Next

Lesson 7
Create default working forms

Once the analysis data is as complete as possible and the database design is stable and complete, you are ready to create a first-cut application design based on information stored in the repository.

The Oracle Designer utility to produce the first-cut application design is the Application Design Transformer. The Application Design Transformer converts functions into candidate modules, which can then be implemented as forms, reports and utilities. The Application Design Transformer also converts function data usages to module data usages that define how a module uses the tables and columns in the database.

The modules created by the Application Design Transformer are 'candidate' modules and are not included in the application design until you accept them (by changing their 'Candidate' property to 'No'). Modules you accept, and their usages, can then be used for generating applications.

Note: You can follow lessons 7 through 9 only if Oracle Forms has been installed.

Generate default module definitions

Objective

To create module definitions for the automated functions.

Instructions

  1. Click on the Function Hierarchy Diagrammer button on the Oracle Designer Window to start the Function Hierarchy Diagrammer.

    Function Hierarchy button

  2. Create a new diagram based on the function AUTO 1 "Handle automated functions".

    You do this by selecting Filearrow.gif (182 bytes)New, setting the default container to TUTORIAL (1), then double clicking on AUTO 1 in the New Diagram dialog box. You may have to resize the diagram to see all of the functions.

  3. On the Function Hierarchy Diagram, select the function AUTO 1 "Handle automated functions".

  4. Select Utilitiesarrow.gif (182 bytes)Application Design Transformer.

    This opens the Application Design Transformer dialog box.

  5. Ensure that the following options are set (these should be the default settings):

    Common Parameters - Start Function AUTO 1
    Common Parameters - Module Prefix TUTORI
  6. Set the Merge Granularity option to Identical Entities And Usages.

    Merge Granularity group on ADT dialog box set to Identical Entities And Usages

    Note: If you leave this option set to the default (i.e., Identical Entities), the Application Design Transformer will create a single module definition for functions DELI 10.4 (AUTO) and DELI 10.5 (AUTO). This single module definition will not enable you to continue with the tutorial.

  7. Click the Generate button.

  8. At the end of the generation process (wait for the percentage completion figure to reach 100%), close the progress box and the dialog box, then exit from the Function Hierarchy Diagrammer. You can save the diagram if you wish, but there is no need to, because all the underlying data was saved in the repository as you worked.

Accept the candidate module definitions for generation

The Application Design Transformer has created "candidate" module definitions. These will not be used for generation unless you change this status.

Objective

To make the default module definitions ready for generation.

Instructions

  1. Click on the Design Editor button on the Oracle Designer Window to start the Design Editor.

    Design Editor button

  2. Choose the Module Applications option on the Welcome screen, then click the OK button. (If the Welcome screen did not appear, change directly to the Modules tab in the Navigator window.)

  3. Select Optionsarrow.gif (182 bytes)Use Property Palette (the option may already be chosen), expand the TUTORIAL application and the list of Modules in the Navigator, then double click on the icon for the first module in the list.

    candidate module icon and module name for TUTORI0010

    The properties for the module are shown in the Property Palette.

    Property Palette for TUTORI0010

    The property names for a particular object are listed in the cells in the left column. The values for the properties are listed in the cells in the right column. When you click on a values cell, it changes to an appropriate input control. The controls you will be using include the drop-down box and the list box. When using the list box, you obtain the list of possible values by clicking the icon on the right of the cell.

    The changes that you make to the values of a particular object (in this case module definitions), will be saved automatically if you display the values for another object. You can also save the values manually.

    To save the changes that you make on the Property Palette manually, select Filearrow.gif (182 bytes)Save Uncommitted Data, or click Save on the Property Palette toolbar.

  4. Under the heading "Planning", change the Candidate? property to No, then save the data manually (as described above).

    The icon for the first module changes to represent a Report.

  5. Change the Candidate? properties of all the other modules to No.

    The icons for the modules will change to represent various module languages.

  6. Display properties for the module whose title is "Publish menu on the Web", change the language to Web PL/SQL, then save the change.

Leave the Design Editor open for the next stage.

Generate a working form

You can now generate a first-cut working form. The generated form will provide basic functionality that you can refine in later lessons.

Objective

To generate a default working form from a module definition.

Instructions

  1. In the Navigator, highlight the module with the name set to "Add new product to the menu".

  2. Select Generatearrow.gif (182 bytes)Generate Module. This opens the Generate Form dialog box.

    Generate Form dialog box

  3. In the Standards group on the Generate Form, ensure that the Object Library Name box is set to find ONLY tutorial.olb and that the Template Name box is set to find ONLY tutorial.fmb. Clicking the Browse button should open a selection box in which these files are listed.

  4. In the Post Generation group, ensure that the Commit option button is chosen

  5. On the Generate Form dialog box, click the Start button.

    Progress is reported in the message window.

  6. When the Generation Complete message has appeared, click the List Actions button on the Message Window.

    List Actions button

    The Build Action dialog box is displayed.

  7. In the Description box, select "Run form [location]\ADD_NEW_PRODUCT_TO_THE_MENU as client server form" and click Run.

    The default working form will be similar to this.

    You can use this form now if you wish. The details that you enter will be recorded on the PRICED_PRODUCTS and PRODUCTS tables of the database that you generated earlier. Note that the fields may not appear in exactly the same order as those in the example above.

    The cursor will be flashing in the Discout Day field.

    Type 1 into the Discount Day field.

    Tab to the Product Description field and type in Ham and mushroom supreme.

    Tab to the Product Id field and type in 1001.

    Tab to the Product Type field and type in PIZZA.

    Choose Action arrow.gif (182 bytes) Save to save the information to the database.  The message "Transaction complete - 1 record applied and saved" is shown at the foot of the window.

    Make further entries if you wish (e.g., for a beverage), but not too many at this stage.

    Now click the Product Id field and type in 1001. This is the product identity number that you previously entered for "Ham and mushroom supreme".

    Tab to the Price field and enter 9.99.

    Tab to Label and type in Medium Ham and Mushroom Supreme.

    Tab to the Size Code field. Choose Edit arrow.gif (182 bytes) Display List to see a list of valid values, highlight M Medium and click OK.

    Tab to Quantity In Stock but don’t enter a value.

    Choose Action arrow.gif (182 bytes) Save to save the information to the database.

    Make a few more entries, if you wish.

    You will have noticed that the fields on the form are held within two blocks, one relating to the Priced Products table and one to the Products table. In the next lesson, the Products table will be made into a lookup table and you will enter only Priced Products information through the generated form.

  8. To close the generated form, press ALT+F4.
  9. Close the Build Action dialog box and the Message Window.

Leave the Design Editor open for the next lesson.


Lesson summary

In this lesson you:



Next

Prev

Next

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