Previous | Page 1 of 1 | Next
Programming Function Keys
Purpose
Form Builder enables you to redefine the actions of function keys. This module shows you how to create key triggers to either intercept, or supplement, the usual function key behavior with which your users navigate an Oracle Forms Developer application.Objectives
After completing this module, you should be able to:Define key triggers and their uses | |
Program function keys | |
Describe the characteristics of key triggers | |
Classify key triggers | |
Associate function keys with interface controls |
Understanding Key TriggersWhen you press a function key, Forms usually performs the default function associated with that key. You can modify the standard functionality of a function key by defining a key trigger for that function key.What is a Key Trigger?A key trigger, like any other trigger, is a subprogram that is executed when a certain event occurs. In the case of a key trigger, the event is pressing the function key for which the trigger is defined. The trigger is usually named after the event that causes it to fire. When the key trigger is defined for a function key, the usual functionality of the key is replaced by the PL/SQL text of the trigger. In this respect, key triggers resemble "on" triggers.Code Examples1) This form-level Key-Exit trigger displays an alert asking the end user if he/she wants to leave the form.SET_ALERT_PROPERTY ('question_alert', ALERT_MESSAGE_TEXT, 'Do you really want to leave the form?');Note: If you also want to execute the default functionality of the function key, you must ensure that the key trigger includes the built-in function associated with the key. 2)The following Key-Crerec trigger disables the Create Record key: BEGIN NULL;END; Defining Key TriggersYou define key triggers in the same way that you define any other trigger. However the following two properties in the Property Palette for triggers only apply to key triggers.
Previous
| Page 1 of 1 |
|
No comments:
Post a Comment