Notify This sample demonstrates how to push FacesMessages to all subscribers.
<p:growl widgetVar="growl" showDetail="true" />
            
<h:form>
    <h:panelGrid columns="2">
        <p:outputLabel for="summary" value="Summary: " /> 
        <p:inputText id="summary" value="#{notifyView.summary}" required="true" />

        <p:outputLabel for="detail" value="Detail: " /> 
        <p:inputText id="detail" value="#{notifyView.detail}" required="true" />
    </h:panelGrid>

    <p:commandButton value="Send" actionListener="#{notifyView.send}" />
</h:form>

<p:socket onMessage="handleMessage" channel="/notify" />

<script type="text/javascript">
        function handleMessage(facesmessage) {
            facesmessage.severity = 'info';

            PF('growl').show([facesmessage]);
        }
</script>
                
PrimeTek, Copyright © 2015
All rights reserved.
Running PrimeFaces-6.1-SNAPSHOT on Mojarra-2.2.8.