<netui:error> Tag

Renders an error message with a given error key if that key can be found in the ActionMessages registered in the PageContext at org.apache.struts.action.Action.ERROR_KEY.

Syntax

<netui:error
    [bundleName="bundleName"]
    key="key"
    [locale="locale"] />

Description

Renders an error message with a given error key if that key can be found in the ActionMessages registered in the PageContext at org.apache.struts.action.Action.ERROR_KEY.

The following optional message keys will be utilized if corresponding messages exist for them in the application resources:

Attributes
bundleName
Required: No  |   Supports runtime evaluation / JSP Expression Language: Yes

The name of the message bundle, as defined in the page flow's Jpf.MessageBundle annotation. This defaults to org.apache.struts.action.Action.MESSAGES_KEY.
key
Required: Yes  |   Supports runtime evaluation / JSP Expression Language: Yes

The key under which the error was stored (often the name of the form bean property associated with the error)
locale
Required: No  |   Supports runtime evaluation / JSP Expression Language: Yes

The name of the session attribute key for the user's locale. This defaults to org.apache.struts.action.Action.LOCALE_KEY.

 
Example

In this sample, the "InvalidName" message from the errorMessages bundle will be used to output the error.

 <netui:error bundleName="errorMessages" key="InvalidName"/>