This tool deals with Struts action messages. A few important aspects about action messages are:
property that describes the category of
message. This allows the view designer to place action messages precisely where they are
wanted. Several methods of this tool provide a parameter
property that allows to select a specific category of messages to operate
on. Without the property parameter, methods operate on all action messages.See the Struts User's Guide, section Building View Components for more information on this topic.
true if there are action messages queued,
otherwise false.
true if there are action messages queued. false otherwise.
Calling exist() without the property parameter checks for action messages of
any category. The property parameter can be used to limit the check to
action messages of a specific category.
Calling getSize() without the property parameter returns the total
number of queued action messages. The property parameter can be used to
obtain the number of queued action messages for a specific category.
$messages.get($messages.globalName)See the section on get() for more information.
The following example shows a macro to render the action messages:
This produces output similar to the following:
java.util.List of java.lang.String.
If no action messages exist for the specified category,
null is returned.
If the message resources are lacking an error message for a
particular message key, the key itself is used as an action message
and a warning is logged.
The following example shows a macro to render the action messages for a particular category of action messages:
This produces output similar to the following: