2018年10月31日 星期三

2018年10月23日 星期二

Show the message generated from the PL/SQL process

We need to show the messages from the PL/SQL process (back-end) to the user (front-end) very often.

One way is to use the global variable APEX_APPLICATION.G_PRINT_SUCCESS_MESSAGE. The Apex will shows the message in the upper right corner with the green box. The method is suitable for showing information that doesn’t need the user to interact with.

The second way is to use APEX_ERROR.ADD_ERROR procedure to add the message to the error stack. When loading the page, the Apex will show these messages. We can specify the locations of showing the messages either on the upper right corner or associate with pages items or event an error page. However, the APEX_ERROR.ADD_ERROR procedure will interrupt the request processing process such that the codes after the APEX_ERROR.ADD_ERROR will not be executed. The method is appropriate for the form validation.

This article presents another way to show the message from the PL/SQL process. We use the Application Item to store the message from the PL/SQL process. There is a Application Process executing on the page loading to show the message in the Application Item using the JS functions in the apex.message namespace.

See the full article: https://hychen39.github.io/oracle_apex/2018/10/17/apex_messages_app_item.html