This page last changed on Feb 17, 2006 by [email protected].

Tag - message

Description

Resolves a message from the given code or error. Normally used in conjunction with "eachError". One of either the "error" attribute or the "code" attribute is required. Messages are resolved from the "grails-app/i18n/messages.properties" bundle.

Parameters

  • error (optional) - The error to resolve the message for
  • code (optional) - The code to resolve the message for

Examples

Loop through each error and output the message:

<g:eachError bean="${book}">
    <li><g:message error="${it}" /></li>
</g:eachError>

Output a message for a specific known code:

<g:message code="my.message.code" />
Document generated by Confluence on Mar 29, 2006 08:46