(Quick Reference)


Call this method in controllers to set the display message for the current request.

The view can render this message using the displayMessage tag.

There are two forms of the method:

displayMessage(String msg) - set the message string (or message code) displayMessage(Map args) - set the message arguments (or message code)

When plugins call this method, their "text" value is automatically namespaced with "plugin.<pluginName>." so this effectively forces all usage in plugins to use i18n messages for text - which is a good thing, because it means the application can override the UI text.

If using the Map arguments form, the args supported are:

textThe text of the label, or an i18n code to resolve to use as the text
textArgsOptional arguments to pass when creating the i18n message text
typeOptional message type indicator i.e. 'warning', 'error', 'info', 'debug'
classOptional CSS class to apply
cssPrefixOptional prefix to apply if "type" is supplied, prepended to the type name

This method stores the message information in the current request scope.