Title: Adding Pop-up Messages
1Adding Pop-up Messages Alerts A pop-up dialog
box attracts the users attention A problem must
be brought to the users attention
2In the Object Navigator highlight Alerts. Click
on Edit, Create
3A default name is given to the new alert. Rename
it MANAGER_ALERT
4Renamed MANAGER_ALERT
5Shows it renamed MANAGER_ALERT in the Object
Navigator
6Notice the message
Amend the properties as shown
7Within the EMPLOYEE block, highlight Triggers
under MANAGERNUMBER. Click Edit, Create.
8Create a WHEN_VALIDATE_ITEM trigger
Click OK
9The next slide shows the use of
FORM_TRIGGER_FAILURE exception handling
FORM_TRIGGER_FAILURE PL/SQL provides Forms
designers with powerful exception handlers that
are used for validation and error handling. The
key to their proper use is the understanding of
the predefined exception FORM_TRIGGER_FAILURE.
When raised it will cause the currently active
trigger, in this case, WHEN_VALIDATE_ITEM, to
stop and return control (along with an error
signal) to the entity which called it either
Oracle Forms, or another trigger.
10The SHOW_ALERT procedure calls up MANAGER_ALERT.
A return value is obtain from the button the user
clicks. In this case there is only the OK button,
the default alert button as specified in the
Property Palette
Enter this code in the PL/SQL editor for the
trigger
Compile and run the form
11The alert pop-up
The message from the Property Palette
Notice that the same number was entered
Click OK
12The number is highlighted and must be changed to
an acceptable Manager Number