PrimeFaces Beginner's Guide
上QQ阅读APP看书,第一时间看更新

Introducing the Messages component

The Messages component <p:messages> is an enhanced version of the standard JSF <h:messages> component with skinning capabilities. The <p:messages> component can be used to display multiple messages corresponding to UI elements.

The <p:messages/> component supports the following additional attributes in addition to the attributes supported by <p:message>:

  • globalOnly: When true, only FacesMessage with no clientIds are displayed. Default value is false.
  • autoUpdate: This enables the autoupdate mode if set to TRUE. Default value is false.
  • for: This specifies the name of associated key, takes precedence when used with globalOnly.
  • closable: This adds a close icon to hide the messages.