Oracle Designer Tutorial


Prev Next

Lesson 9
Generate a refined Oracle Developer Form

During this lesson, you will make further changes to the default design of the Priced Products form. You will then regenerate the form to incorporate all the changes you have made.

Set preferences to influence generation

The final appearance of a generated form is determined by many of the design decisions and defaults that you have already encountered. There is, however, one very important set of preferences that you have not yet seen. These are the Generator Preferences, and the purpose of this exercise is to make you aware of their potential by changing just one of them. If you do not change the Generator Preferences, a default set will apply in all circumstances and this might be perfectly acceptable to you.

Objective

To increase the width of border lines on the generated form.

Instructions

  1. On the module diagram for the module with the name set to "Add new product to the menu", select the PRICED_PRODUCTS module (outer, gray box) and click the Generator Preferences toolbar button.

    Generator Preferences toolbar button

    This opens the Generator Preferences palette.

    generator preferences palette

  2. Expand the Layout - Block preference node and change the "Block brush width" (BLKBWD) preference to 4.

    You can obtain an explanation of a preference by clicking on the Context Sensitive Help button on the toolbar and then clicking on the preference name.

  3. Save the preference data by clicking the Save button on the palette toolbar.

  4. Close the Generator Preferences palette.

Change a display characteristic of the generated form

So far, you have looked at module diagrams in "data view". There is an alternative, which is "display view". In display view, you can change certain physical aspects of the generated form by direct manipulation of objects on the diagram.

Objective

To change the order of the fields on the generated form so that Product Id is the first.

Instructions

  1. Make the Module Diagram active for the module with the name set to "Add new product to the menu", then select Viewarrow.gif (182 bytes)Display View.

    The diagram appears as follows:

    module diagram for TUTORI0050 in display view

  2. With the mouse pointer, grab each of the module component items in turn and move them up or down the list, into the following order:

    Product Id
    Product Id
    Product Description
    Product Type
    Discount Day
    Size Code
    Price
    Quantity In Stock
    Label
    Priced Products Id

Generate, run and use a form

You generated and used a form in a previous lesson, but that was a default design. Now is the time to generate the changes you have made to that design.

This lesson also deliberately gives alternate instructions for procedures you have already followed, so that you can see that there is more than one way to do some things.

Objective

To generate, run and use the refined Products form definition.

Instructions

  1. Select the module with the name set to "Add new product to the menu" in the Navigator or on a Module Diagram.

  2. Select Generatearrow.gif (182 bytes)Generate Module.

    This opens the Generate Form dialog box. Check that the Object Library Name and Template Name boxes are still set ONLY to tutorial.olb and tutorial.fmb.

  3. Click the Start button.

    The message window is opened in the lower part of the Design Editor. Messages tell you what further changes the generator intends to make to the module definition. When generation is complete, the message "Generation complete" appears in the message window.

    If you wish, you can close the message window by choosing Viewarrow.gif (182 bytes)Message Window.

  4. Select Runarrow.gif (182 bytes)Forms Runtime.

    This opens the Oracle Developer Forms Runtime window and the Forms Runtime Options dialog box.

  5. In the File box, type in the name of (or browse to) the generated module ([Oracle_Home]\cgenf61\ADD_NEW_PRODUCT_TO_THE_MENU.fmx), enter your user id, password and the database name, then click OK.

    The Priced Products form is displayed, showing the changes that you have made since lesson 7.

    Products form as generated

    If you wish to use the form and did not enter Product information in the default form on lesson 7, you must now populate the PRODUCTS table using the script provided. You do this by choosing the Populate Tutorial [Tables] program from the Oracle Designer Tutorial folder. If you are prompted to enter a username, enter your username, password and database connection name in the following format:

    <username>/<password>@<connection_name>

    You can now use the form to record priced products data on the database. You will have noticed the thicker border. Notice also that the Product Id field is the first in each record. Also that the Size Code field has a drop-down list.

    You can save the data that you enter on the form by clicking the Save button on the toolbar. You can close the form by selecting Actionarrow.gif (182 bytes)Exit.

    Close the module diagram in the Design Editor, but 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.