APEX 21.2
I would like ALL client and server side notification messages (success & error) to be auto dismissed after 5 seconds.
The following block of JS code in the Execute When Page Loads attribute seems to do the trick
apex.message.setThemeHooks({
beforeShow: function(pMsgType, pElement$){
setTimeout(function() {
pElement$.fadeOut('slow');
},5000);
}
});
apex.jQuery(function() {
apex.theme42.util.configAPEXMsgs({
autoDismiss: true,
duration: 5000
});
});
But instead of repeating this code on all pages, I tried putting it in an Page Load DA on Page 0. This did NOT work
Next, I put this code in Shared Components < Static Application Files (app.js) and included this file under Application < User Interface < JS using #APP_FILES#app.js. This did not work either.
What am I missing here? Why does the Page 0 or Static Application File method not work?
Thanks