The messages component renders all Faces messages, all Faces messages for a specific component, or all Faces messages not associated with any component.
|See the ICEfaces Showcase Live Demo of this component, complete with source code.|
Styling is done by predefined jQuery classes in theme stylesheets:
- Info: ui-icon-notice w/ ui-state-highlight css
- Warn: ui-icon-info w/ ui-state-highlight css
- Error: ui-icon-alert w/ ui-state-error css
- Fatal: ui-icon-alert w/ ui-state-error css
You can use the style and styleClass attributes to override the styles.
This section covers attributes involved in the typical use-cases for this component. For reference, the complete taglib documentation for this component is available here.
for: Identifier of the component for which to render error messages. Leave out or use "@all" to output global messages. To show messages for only those components in the view, use @inView.
globalOnly: Flag indicating whether only global messages (that is, messages with no associated client identifier) should be rendered.
style: CSS style(s) to be applied when this component is rendered.
styleClass: Space-separated list of CSS style class(es) to be applied when this element is rendered.
Client Behavior Events
The client side component object is exposed through the global variable name specified in the widgetVar attribute.
var widget = ice.ace.instance('frm:componentId);
|The ice.ace.instance function requires the full client id of the component to be specified, such as "j_idt77:componentId" instead of just "componentId". To reduce the complexity of working with complete IDs with this function it may be preferable in some cases to use prependId="false" in the enclosing form (e.g. <h:form prependId="false">).|
Keyboard and ARIA Support
The following ARIA roles are supported: alert.
The following markup represents the basic HTML structure of the component and the CSS classes it uses.
<div class="ui-faces-messages ui-widget [user defined classes]" style="[user defined styles]">
<div class="ui-corner-all [ui-state-highlight | ui-state-error]">
<span class="ui-icon ui-icon-info"></span>Message