Oracle Application Express has a built-in Global Notification functionality you can use to inform your users about various things, such as a new release or scheduled maintenance. However, the default message just doesn’t look very good and sticks out like a sore thumb in an otherwise nice theme. How to make it fit a little bit better? Here’s a solution from an experienced APEX developer and an Oracle ACE.

Imagine you’ve just got your Production Application up and running. Doesn’t it look sweet with that new theme? However, the work isn’t done yet – you need to squeeze another release in, but you want to make sure you inform your users that an upgrade will be occurring soon, just in case of a hiccup. How to do that in a way that doesn’t ruin the looks?

We don’t want to ruin this, do we?

The problem – what we’re trying to avoid

If we look under Shared Components > Edit Application Definition > Global Notification, we have exactly the correct place to add a message

When you Apply the Changes and run, it technically works, the users are informed, but it kind of ruined my theme.

Technically, this is okay-ish, I guess, but… eeeh.

APEX Global Notification messages done the right way

Luckily Global Notification accepts HTML, so we can provide a better-looking text (based on the Alert Template).

And when we run the page, it looks like this:

Much better now!

It’s worth noting you can also change the t-Alert–info class to t-Alert–warning if you want to change it to an orange triangle.

You can even remove the classes:

  • t-Alert–accessibleHeading 
  • t-Form—noPadding

This will make the message more visible to your users. Just like this:

Or maybe this way?

Don’t lose sight of that HTML fragment!

One last thing…

Since you now have an HTML fragment that you added to PROD, when you export/import the new application from DEV it will wipe out the Global Notification, and the message along with it, as is expected.

However, the next time you plan a release, where are you going to find that fragment of HTML again? Well, you are welcome to bookmark this blog to get another copy, but you can also do what I did – add it to DEV with a style=”display:none” tag.

Technically this is rendered on all pages, however, due to the style tag, the message does not display.

So all you need to do on PROD before a release is:

  1. Remove the style tag.
  2. Change the unavailability message to suit your release slot.

Then the new imported app from DEV will retain its display:none tag.

Don’t give up on your theme

And that’s it – we’re done. That was really easy, wasn’t it? Hopefully, these few simple steps will help you stylise your System Maintenance messages a little bit better, and therefore allow you to preserve your application’s visual theme. Remember you can always bookmark this page and copy the code samples, whenever you’ll need them. For more information on APEX check out the other articles on the Pretius blog:

  1. How to integrate Stripe with an Oracle APEX application: Step-by-step guide
  2. Oracle APEX new features – the low-code platform keeps evolving
  3. Google Identity Services – a quick guide on using the new library in Oracle APEX applications
  4. What is Oracle APEX? Possibilities and career paths for low-code developers