You can model the messages in a Mendix entity and display them condionally anywhere on a page.
Create a boolean attribute: showMessages, default false. Create an entity Messages (1:* with main). Display the list conditionally. Warning: this is a single user solution.
EDIT 1: For a multi-user: use an reference set association to message, although messages are never used more than once. The reference is in memory. When you refresh the main object, but not commit the screen for that user is refreshed and message displayed on screen. Delete the messages when the object is finally commited. Always set the showMessages on false on commit. Otherwise another user may see your messages on screen.