[Top of Document]

Chapter 3

New Features

Oracle Forms 4.5 provides many new features and functionality that can greatly enhance the GUI of your application, improve user productivity, ease your maintenance effort, partition your applications and integrate with other products.

Improve User Interface

This section introduces you to the various GUI widgets that will make your application more graphical. These widgets enable your users to reap the ease-of-use benefit in truly graphical applications. You should look at your existing application and use these new GUI widgets in place of the simulated character-mode equivalents.

Buttons and Toolbar

Buttons are very effective in invoking commonly used operations or replacing features frequently accessed through the menu. When the user presses a button, the PL/SQL code in the WHEN-BUTTON-PRESSED trigger is executed. You can also create a horizontal or vertical runtime toolbar of buttons allowing the users access to the most frequent operations throughout the application. You can use buttons and toolbars for frequently accessed menu selections so that users do not need to pull down the menu for these operations.

List of Values

The LOV is now a named object, separate from the text item. As a result, it can be associated with more than one text item, and can be shown and hidden programmatically, independent of the current cursor location. The values in the LOV are derived from a record group.

The record group is an internal data structure which has a column/row framework similar to database tables and whose values come from a SQL statement that executes at runtime or from static values specified at design time.

The LOV appears in a separate window with an Auto-Reduction feature that will reduce the list based on a user-specified criteria. The following figures show the LOV in character-mode and bitmapped environments.

Checkboxes

Checkboxes are two-state controls that indicate whether a value is on/off, true/false and can be used to represent any Boolean-style items. A checkbox is either checked or unchecked and you have the option to specify how other values in the database should be displayed. For example, you can use a checkbox to indicate whether a customer has been approved for a loan.

Radio Groups

A radio group is a group of radio buttons which represent mutually exclusive values. The user can only select one value at a time and the previously selected value will be deselected automatically. This feature allows the user to see all the valid values for an item at once. For example, you can use a radio group for Plan Type with values of Medical, Dental and Vision.

List Items

A list item is a list of mutually exclusive text elements that can be displayed as either a poplist, text list or combo box. Unlike a radio group, the list item can be populated at runtime. There are two major advantages of using a list item over the List of Values.

Figure 10 Text list, poplist and combo box for displaying a list of values Since the checkbox, radio group and list item only displays the valid items, there is no need for validation code on that input. In addition, when the user changes the value of the checkbox, radio group or list item, the code in the following triggers is executed respectively.

Multi-line Text Items

A multi-line text item displays several lines of text with an optional word or character wrap style. You can use this for text items that are too long to fit on a single-line text item where users need to invoke the editor to see the entire string.

Alerts

An alert is a modal pop-up window that notifies the user of some condition in the application. Oracle Forms has many built-in alerts that display pre-defined messages and you can also create your own custom alerts.

You can use this for any pop-up window to notify and prompt users of any undesirable operations such as querying a different record before committing the changes to the database. Since alerts take the native look-and-feel of your platform, using alerts in your forms will give a consistent interface in your application.

Stacked Canvas-view

A content canvas-view is the "base" view and occupies the entire window in which it is displayed. A stacked canvas-view can be displayed in the same window as a content canvas-view and any number of stacked canvas-views. It can be anywhere on a window and usually hides certain portions of the window. Stacked canvas-views are similar to pop-up pages in many ways and you can use them wherever pop-up pages were.

Images

Images can be incorporated into your application as static boilerplate or dynamic image items. Static boilerplate images can be imported into your application at design time and stored as part of your form module. Dynamic image items can display images from a column in the database or a file in the file system. The bitmap, however, is only populated at runtime and not stored as part of the form module.

If your application can convey more meaningful information to your user with the use of some pictures, you might want to consider adding images to your application. You do not need to modify your database structure if you just load the images dynamically from the file system.

For instance, if you have a multi-row block and want to display a different image for each row of data, you can use the built-in READ_IMAGE_FILE in a WHEN-NEW-RECORD-INSTANCE trigger to dynamically display the corresponding image for that row. There are also built-ins to scroll and zoom the image.

Special Menu Items

Menus come in three different styles - full-screen, bar and pull-down. A pull-down menu avoids displaying too many screens to the user and makes the options available all the time. Besides the plain menu item, special menu items like checkbox and radio are available.

Instead of cluttering the screen with status information, you can move the "status indicator" fields to the checkbox or radio menu items. You can also provide the Cut, Copy, Paste functionality with the respective magic menu items.

Ease Maintenance

Various new features are provided to make your applications more declarative, shareable and reusable. Not only will these features make your maintenance easier, it will greatly improve development productivity when enhancing these applications in the future.

Current Record Attribute

The current record attribute property determines the visual appearance of the current record in your form or block when defined at the form or block level. At the item level, it determines how an item will be displayed.

You can use this property to assign a visual attribute to items instead of doing it programmatically in a trigger. For example, you can define a visual attribute with a different background color and assign this visual attribute to the block's current record attribute property to highlight the current record in the block.

Relations

> The relation object is used to define a master-detail relationship between blocks. You can define this relation at any time during the development process instead of just in the detail block property sheet as in SQL*Forms 3.0. There are two properties that control the relation - Master Deletes and Coordination.

The Master Deletes property controls how the deletion of a record in the master block should affect records in the detail block. You can decide if you want to perform a cascading delete, prevent deletion of the master record if details exist or proceed with the deletion of the master record in any case.

The Coordination property controls when the detail block should be populated. You can populate the detail immediately after the master block is queried, upon entry to the detail block, or only when the user explicitly queries it.

When you create a relation or change the properties of an existing relation object, Oracle Forms automatically generates the code required to enforce coordination between the master and detail blocks. In addition, complex relations like a master with dependent details and a master with independent details can also be created in the same fashion. This will significantly ease your maintenance effort.

Navigation Style

A new block property, Navigation Style, determines how the Next Item or Previous Item operation is processed when the input focus is in the last navigable or first navigable item respectively. For example, you can choose to stay in the same record, navigate to the next record or the next block on a Next Item operation. Instead of controlling navigation through key triggers, you can make use of this new declarative way to perform navigation.

Declarative Insert, Update, Delete and Query Allowed

New block properties, Insert Allowed, Update Allowed, Delete Allowed and Query Allowed, puts declarative control of your transactions in your hands. You no longer need the key trigger code that provide this behavior and can achieve the same effect by setting the appropriate properties.

PL/SQL Library

A PL/SQL library is a collection of procedures, functions and packages providing a convenient means of storing client-side program units in the file system or database, and sharing them amongst applications.

You have to move your referenced program units into libraries and then attach these libraries to the referencing form modules as Oracle Forms 4.5 no longer supports creating new referenced program units in form modules. If you are upgrading your application, references are still allowed although you cannot make new references to these program units.

One advantage of using libraries is that their contents are loaded on demand thereby reducing runtime memory requirements.

Property Classes

A property class is a named collection of properties and methods (triggers) upon which you can base other objects. In addition, a property class can inherit from another property class allowing multi-level inheritance. This brings a whole new world of designing your applications into your hands.

For example, you can quickly define property classes that conform to your own interface and functionality standards and base other application objects on these classes providing a consistent look-and-feel to your applications.

In addition, if you decide to change, say the background color of all screens, at a later time, you only need to change the property class defining the background color of screens. This will greatly improve development productivity and reduce maintenance effort.

Partition Application

With PL/SQL being used on both Oracle7 and Oracle Forms, you can easily move your code between client and server at any time without any re-writing at all. Oracle Forms 4.5 brings application partitioning to you with just a mouse drag operation. You should examine your code and determine if you can move some of them to the server.

For example, you may need to perform an analysis of some data residing on the server and then display that on the form. Instead of retrieving all the data values and performing the analysis on the client machine, you can put this code on the server and return the result set for display on the client, thus reducing network traffic.

Another example where you can move the code to the server is when you have multiple DML (data manipulation language) statements that needs to be performed during commit.

In the case of validation, you have to decide if you want it to be done immediately after the user leaves the item or just before it gets committed to the database and place that code on the client or server accordingly.

Integrate with Other Products

Oracle Forms 4.5 provides great flexibility with an open architecture where you can easily extend the capabilities of your applications. On Windows, it supports VBX controls, OLE and DDE in addition to calling DLLs from PL/SQL.

VBX, OLE and DDE Support

On Windows, Oracle Forms 4.5 allows you to incorporate any Visual Basic 3.0 custom controls (VBX) into your applications. For example, you can purchase a gauge control to enable users to enter values graphically.

You can also use Oracle Forms as an Object Linking and Embedding (OLE) 2.0 container for seamless integration of spreadsheets, documents, media clips and drawings into your applications. In addition, you can exchange data with any Dynamic Data Exchange (DDE) server.

DLL Support

You can tap into any native function or application programming interface (API) by calling their dynamic link libraries (DLLs) from PL/SQL. For example, you can access some Windows-specific functionality that is not provided directly by Oracle Forms.

Reports and Graphics Integration

Oracle Forms 4.5 is tightly integrated with Oracle Reports 2.5 and Oracle Graphics 2.5 in Developer/2000. Integrated applications improve user productivity by providing seamless access to various special purpose tools.

For example, you can design a report that prints all transactions for any customer satisfying some specified time criteria. You can then call this report from forms passing it the current customer and the time period you are interested in.

You can also embed an interactive pie chart showing what and how much of each product this customer has bought this year in your form. Your user can then drill down on the pie chart to look at all transactions for a particular product.

For more information on the capabilities of Oracle Reports and Oracle Graphics, please refer to the CDE2 Tools datasheet, part number A21931.

To conveniently walk through click on the Continue icon found at the end of each section.
Continue

Part #: A32362


Copyright © 1996 Oracle Corporation. All Rights Reserved.