<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
.
<netui:error
[bundle="bundle"]
[bundleName="bundleName"]
key="key"
[locale="locale"] />
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:
- error.prefix - If present, the corresponding message will be
rendered before each individual error message.
- error.suffix - If present, the corresponding message will be
rendered after each individual error message.
Attributes |
bundle |
Required: No | Supports
runtime evaluation: Yes | Data bindable: |
|
|
bundleName |
Required: No | Supports
runtime evaluation: Yes | Data bindable: |
|
|
key |
Required: Yes | Supports
runtime evaluation: Yes | Data bindable: |
|
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: Yes | Data bindable: |
|
|
In this sample, the "InvalidName" message from the errorMessages bundle will be used to output the error.
<netui:error bundleName="errorMessages" key="InvalidName"/>