Messages Messages components are used to display FacesMessages.

<p:tooltip />
        
<h:form>
    <p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />

    <p:commandButton value="Info" actionListener="#{messagesView.info}" />
    <p:commandButton value="Warn" actionListener="#{messagesView.warn}" />
    <p:commandButton value="Error" actionListener="#{messagesView.error}" />
    <p:commandButton value="Fatal" actionListener="#{messagesView.fatal}" />
</h:form>

<p:separator />

<h:form>
    <h:panelGrid id="grid" columns="3" cellpadding="5">
        <p:outputLabel for="default" value="Default:" />
        <p:inputText id="default" required="true" />
        <p:message for="default" />

        <p:outputLabel for="txt" value="Text:" />
        <p:inputText id="txt" required="true" />
        <p:message for="txt" display="text" />

        <p:outputLabel for="icon" value="Icon:" />
        <p:inputText id="icon" required="true" />
        <p:message for="icon" display="icon" />

        <p:outputLabel for="tt" value="Tooltip:" />
        <p:inputText id="tt" required="true" />
        <p:message for="tt" display="tooltip" />
    </h:panelGrid>

    <p:commandButton id="submitButton" value="Submit" update="grid" />
</h:form>
                
PrimeTek, Copyright © 2015
All rights reserved.
Running PrimeFaces-6.1-SNAPSHOT on Mojarra-2.2.8.