Oracle Designer Tutorial


Prev Next

Lesson 8
Refine modules for generation

In lesson 7 you generated (and possibly used) a form that had been given default characteristics based on design information supplied earlier. You can now change the default characteristics to meet your further requirements. One way to do this is to use the Navigator to find the object that you want to change (e.g., the Discount Day field), then open the Property Palette and make the changes. Another way is to open a diagram so that the objects can be easily seen, then to open the Property Palette from the diagram. The latter method is described in this lesson.

Change form characteristics

By default, the form generator will provide a menu item for opening a list of values for a field on a form. As an alternative, you can provide a list of values by making the field a drop-down list.

An automatically generated attribute is given a name that might not be meaningful when used as a prompt on a generated form. You can change such prompts to a more meaningful one.

Objective

To set up a drop-down list and change a field prompt on the Priced Products form.

Instructions

  1. In the Design Editor, create a module diagram for the module with the name set to "Add new product to the menu". You do this by dragging this module from the list of modules in the Navigator to the blank work area of the Design Editor.

    module diagram with TUTORI0040 module

  2. Display the Property Palette for the SIZE_CODE bound item property, in one of the following ways.

    If the Property Palette is already open, you display the correct properties by single clicking SIZE_CODE on the diagram.

    If the Property Palette is not already open, you open it by selecting Optionsarrow.gif (182 bytes)Use Property Palette then double clicking the A icon next to SIZE_CODE.

    The Property Palette title bar will say "TUTORIAL: Bound Item Properties".

  3. Scroll down to the Display Type property and change it from "Text" to "Pop list", then save the change by clicking the Save button on the Property Palette toolbar.

  4. Display the Property Palette for PP_ID. In the Display section, change the Prompt text to "Priced Products Id". Save the changes.

Create a lookup table

In the default generated form that you have already seen, the fields for inputting Products data appeared on the Priced Products form. Now we are going to assume that Speedy Pizza will store product data on the database as a separate operation, and that the "Add new product to the menu" process uses this information to create specific "menu" items. For example, Speedy Pizza has a basic product called "Ham and mushroom supreme", one of its pizzas. This is available in small, medium and large sizes, and each of these variants must appear on its menu. This is achieved through the Priced Products form, by creating separate records for small, medium and large pizzas, all incorporating "Ham and mushroom supreme" from the Products lookup table.

Objective

To change the Products table into a lookup table.

Instructions

  1. On the module diagram for the module with the name set to "Add new product to the menu", drag the PRODUCTS table usage (yellow box) so that its left side overlaps the right side of the PRICED_PRODUCTS table usage.

  2. When a broken vertical indicator line appears to the right of the PRICED_PRODUCTS table usage, release the mouse button.

    A lookup link appears on the diagram. The crow's foot always points to the table on the left, which is the usage that contains the foreign key column.

    module diagram for TUTORI0050 showing PDT as a lookup of PP

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.