120 likes | 136 Views
Adding Pop-up Messages – Alerts A pop-up dialog box attracts the users attention A problem must be brought to the users attention. In the Object Navigator highlight Alerts. Click on Edit, Create. A default name is given to the new alert. Rename it MANAGER_ALERT. Renamed MANAGER_ALERT.
E N D
Adding Pop-up Messages – Alerts A pop-up dialog box attracts the users attention A problem must be brought to the users attention
In the Object Navigator highlight Alerts. Click on Edit, Create
A default name is given to the new alert. Rename it MANAGER_ALERT
Notice the message Amend the properties as shown
Within the EMPLOYEE block, highlight Triggers under MANAGERNUMBER. Click Edit, Create.
Create a WHEN_VALIDATE_ITEM trigger Click OK
The 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.
The 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
The alert pop-up The message from the Property Palette Notice that the same number was entered Click OK
The number is highlighted and must be changed to an acceptable Manager Number