Messages & Dialogs

Messages and dialogs are included in XHTML templates and can be manually added in generated XHTML files. The parent classes of generated [==Layout‑Name==]Bean classes contain methods in the form of

  • addMessage(...)
  • addWarningMessage(...)
  • addErrorMessage(...)
  • addValidationMessage(...)

All those methods in the end call facesContext.addMessage(null, ...). The first parameter of that call (a client id) is always null. The provided message is displayed in a <p:growl> or a <p:messages> component.

Info

There is more modeling and generation support planned for messages. With this all possible messages that can occur while interacting with a web page will be defined. You will at least get a generated enumeration and corresponding entries in properties files for i18n purposes.