Previous | Table of Contents | Next

Page 341

Figure 12.16.
Changing the Forms
Designer options.

Menus

The Forms Designer stores a menu in a file with an extension of .mmb. When you generate a menu, the Forms Generator uses the .mmb file to generate an .mmx file. When you run a form that has a menu, the Forms Runtime program executes the .mmx file. You also can convert an .mmb file, which is binary, to an .mmt file, which is a text file. You can use a version control system to manage changes in the .mmt files.

Libraries

A library consists of PL/SQL procedures, functions, and packages. The Forms Designer stores a library in a file with an extension of .pll. When you generate a library, the Forms Generator uses the .pll file to generate a .plx file. When you run a form with an attached library, the Forms Runtime program executes the code contained in the .plx file. You also can convert a .pll file, which is binary, to a .pld file, which is a text file. You can use a version control system to manage changes in the .pld files.

Elements of a Form

A form is defined by a collection of objects. Some of these objects are mandatory, and some are optional. Each object can be one of the following:

Page 342

Later in the chapter, you get an in-depth look at each of these objects, but first, the following section examines the use of the Object Navigator.

Working with the Object Navigator

The Object Navigator is an intuitive, convenient interface for creating and manipulating forms, menus, and libraries. The Object Navigator displays objects in a hierarchical
manner. For each module type—form, menu, or library—the Object Navigator displays a set of nodes beneath each module. For example, beneath each form, the following nodes are displayed: Triggers, Alerts, Attached Libraries, Blocks, Canvas-Views, Editors, LOVs, Object Groups, Parameters, Program Units, Property Classes, Record Groups, Visual Attributes, and Windows. You can use either the mouse or the up and down arrow keys to navigate between nodes.

To the left of each node is a box. If the box is empty, no objects of that node type exist for the form. If the box contains a +, the form does have objects of that node type. The + indicates that the node can be expanded—it is currently collapsed. There are a couple of ways to expand a node:

If the box contains a -, there are objects of that node type but they are already fully expanded. There are a couple of ways to collapse a node:

As an example, the Student form contains three nodes with objects: Blocks, Canvas-Views, and Windows (see Figure 12.17).

To expand each of these three nodes, click the box to the left of each node (see Figure 12.18). As you can see, the Student and Button_Palette blocks each have a + in the box, signifying that they can be further expanded.

Page 343

Figure 12.17.
Expanding the nodes
of the Student form.


Figure 12.18.
Expanding the nodes
with the Object
Navigator.

Page 344


Each of these objects has a set of properties. To display the properties for a particular object, you can do one of the following:

For example, to see the properties of the Student block, navigate to the Student block with the mouse or up/down arrow and right-click Properties (see Figure 12.19).

Figure 12.19.
Displaying the
properties of the
Student block.

Object Properties

From the Object Navigator, you can examine and modify an object's properties. To access an object's properties, left-click the object node. Alternatively, you can select the object with the mouse and select Tools | Properties. You also can right-click Properties.

The properties that are displayed for an object depend on the type of object. You'll see some examples of object properties in the next few pages.

Blocks

Almost every form contains at least one block. There are two types of blocks: base table blocks and control blocks. A base table block is related to a specific table or view, and a con-trol block isn't related to a table or view. Almost every block has one or more items. At least one item in a base table block is related to a column in the block's table or view.

Page 345

NEW TERM
A base table block is an Oracle Forms block that is associated with a database table or view.
NEW TERM
A control block is an Oracle Forms block that is not associated with a database table and usually contains control objects such as buttons.

To access a block's properties, select the block and right-click Properties. A window displaying the block's properties will be displayed. For example, if you want to specify an ORDER BY clause for the Student block, use the arrow key to navigate to the ORDER BY clause property. At the top of the Properties window, you can then enter the ORDER BY clause or click the button containing the yellow balloon to the right of the field. For instance, if you want the records in the Student block ordered by year first and then the student's name, enter the ORDER BY clause as shown in Figure 12.20 and press Enter to assign the value to the property.

Figure 12.20.
Setting the ORDER BY
block property.

Base Table Block Items

A base table block contains items that are associated with the columns of a table or view. Each item has its own set of properties which can be accessed by selecting the item and right-clicking Properties. One important item property is the Item Type. To change an item's type, select the Item Type property, and select the item type that you want to use from the pop-up list at the top of the Properties window, as shown in Figure 12.21.

There are many other item properties that affect the appearance and behavior of an Oracle Forms application. Some of these item properties control what is entered in the item by the user. For instance, the Case Restriction item is set to Mixed by default. To change it, select the Case Restriction item, and click it until the property changes to Upper.

Previous | Table of Contents | Next

Используются технологии uCoz