Oracle ADF has a very nice component af:messages that can show out of the box messages on the page.
This component has 2 modes. Default – it is shown as popup and second one, to be shown as inline component.
Inline mode is preferred, since it is less annoying than closing all the time popup and generally people don’t like popups since it reminds them about all commercial that pops up almost on every web site.
To switch the af:messages to the inline mode all you need is to set inline=”true”.
But since now your message is part of the page it actually takes some place that is used to display it.
It would be much better if your messages will appear only on demand and occupy display space also only when needed.
It can be achieved very easily by using panel stretch layout. Just place messages component into “top” facet and set facet height to “auto”
Sample workspace (18.104.22.168) can be downloaded here