A script-enabled browser is required for this page to function properly.

Types of Events

Oracle Forms recognizes a predefined set of runtime events, each of which has a corresponding built in trigger. When you add code to an application by writing a trigger, it is important to decide what event should fire the trigger. The event you choose determines the name assigned to the trigger.

Interface Events

When selecting triggers, it is important to understand precisely when events occur, both in relation to other events, and in relation to form processing. Some events are external interface events, and their occurrence is immediately apparent. Examples of such events, and their corresponding triggers, include the following:

Event

Trigger Name

Pressing a button

When-Button-Pressed

Clicking a check box

When-Checkbox-Changed

Pressing the Tab key

KEY-FN

Internal Processing Events

Internal events occur as a result of runtime processing. These events occur according to the Oracle Forms processing model.

Consider a form with two blocks, Block A and Block B, with text items in each block. On GUI platforms, operators can move the input focus from a text item in Block A to a text item in Block B by clicking the target item with a mouse. Although this operation involves only one interface action (the mouse-click in the target item), it actually sets off a series of internal processing events, each of which has one or more corresponding triggers:

Event

Trigger Name

Validate the item

When-Validate-Item

Leave the item

Post-Text-Item

Validate the record

When-Validate-Record

Leave the record

Post-Record

Leave the block

Post-Block

Enter the block

Pre-Block

Enter the record

Pre-Record

Enter the Item

Pre-Text-Item

Ready block for input

When-New-Block-Instance

Ready record for input

When-New-Record-Instance

Ready item for input

When-New-Item-Instance

It is important to understand that navigational events such as "Leave the Item" and "Enter the Block" occur as a result of internal form processing navigation. These events occur as Oracle Forms validates data in the form and "navigates" through the object hierarchy to move from one item to another.

In the example, to move the input focus from a source item in one block to a target item in another, Oracle Forms first validates the value in the source item, then "enters the record" to validate all of the items in the record, then leaves the record and "enters the block," and so on, finally ending up in the target item.

The Oracle Forms processing model enforces the integrity of data at the item, record, block, and form level. The rich assortment of events to which can be responded with trigger code gives complete control over every aspect of an application.

Processes and Sub-Processes

A process is a series of individual, related events that occurs during a specific Oracle Forms Runform operation. The previous example described a navigational process. Other processes involve validation and database transactions. For example, the Post and Commit Transaction process includes a complex series of events and sub-processes.


About Triggers and Events

Trigger Definition Level and Scope

Creating a trigger in the Object Navigator

Setting trigger properties

About writing trigger code

About compiling triggers

About writing SQL statements in triggers

Overview of trigger categories