Hello,
Environment info:
- APEX version: 5.1.1.00.08
- DB version: 11.2.0.2.0
There is functionality to remove some records from table. When particular button is pressed, process which remove selected record is lunched.
When removal is finished with success, notification message is displayed with success information. I use apex_application.g_print_success_message:
declare
v_result common_result := common_result();
begin
v_result := PKG_TEST_CASE.DELETE_TEST_CASE( pi_id => :P200_TEST_CASE_ID);
IF v_result.status = 0 THEN
apex_application.g_print_success_message := 'Test Case deleted';
ELSE
apex_application.g_print_success_message := v_result.detailed_message;
END IF;
end;
Everything works fine besides one annoying thing. Each time, I reload page with browser refresh button, this notification is displayed until I clear page cache. I can press "X" button at the top right corner of notification but after refresh it is displayed again.
I was trying to clear page cache before / after header / regions etc. I have tried another approach, I have set how long notification should be displayed with JS:
apex.message.setThemeHooks({
beforeShow: function( pMsgType, pElement$ ){
apex.theme42.configureSuccessMessages({
autoDismiss: true,
duration: 2000
});
}
});
Of course it works, but after each refresh notification is displayed and after 2 sec. it is automatically closed. This solution does not meet all my requirements.
Is it possible to display such notification only once? Maybe there is some parameter for notifications which should be set or something like that.
Thank you in advance for your help.
BR,
Lukasz