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

Other Trigger Categories

The previous section Listed triggers in groups according to their functions. Triggers can also be categorized by name. There are five such categories, each relating to a particular type of event that occurs during runtime processing.

When-Event Triggers signal a point at which Oracle Forms default processing may be augmented with additional tasks or operations. For example, the When-Validate-Item trigger fires immediately after Oracle Forms validates data in an item.

To augment the default validation checks that Oracle Forms performs, code additional validation in a When-Validate-Item trigger. Most When-event triggers can include calls to restricted Built-in subprograms.

On-Event Triggers signal a point at which Oracle Forms default processing may be replaced. For example, the On-Logon trigger fires when Oracle Forms readies to log on to an ORACLE data source. If the application requires a connection to a non-ORACLE data source, code an On-Logon trigger to pass the appropriate logon parameters to the non-ORACLE data source. This completely replaces the default logon to ORACLE. On-event triggers can include calls to unrestricted Built-in subprograms.

Pre-Event Triggers signal a point just prior to the occurrence of either a When-event or an On-event. Use triggers for these events to prepare objects or data for the upcoming event. Pre-event triggers can include calls to unrestricted Built-in subprograms.

Post-Event Triggers signal a point just following the occurrence of either a When-event or an On-event. Write triggers for these events that validate objects or data, or that perform some auditing tasks based on the prior event. Post-event triggers can include calls to unrestricted Built-in subprograms.

Key Triggers have a one-to-one relationship with specific keys. That is, the trigger fires when the operator presses a specific key or key-sequence.

Remember that most GUI applications offer operators more than one way to execute commands. For instance, an operator might be able to execute a query by clicking a button, selecting a menu command, or pressing the [Execute Query] key.

In such situations, it would be a mistake to place all of your application logic in a key trigger that might never fire. Similarly, in any mouse-driven application, you cannot rely entirely on key triggers for navigational keys like [Next Item] and [Next Block]. Because operators can navigate with a mouse, they may choose not to use these keys for navigation, and the associated triggers


Creating a trigger in the Object Navigator

Block processing triggers

Interface event triggers

Master/Detail triggers

Message-handling triggers

Navigational triggers

Query-time triggers

Transactional triggers

Validation triggers