Primefaces form field requiredMessage shows twice

jsfprimefaces

I have a form with p:messages and with a inputText field. The inputText field is required and has a requiredMessage. When the commandButton is clicked with empty inputText, I want to show messages only using p:messages, but I see the same message twice. Once using p:message and the other I believe is server side validation message(like a growl at top right corner). My relevant code is as follows :

<h:form id="saveUserForm">
  <p:panel style="border:none">
    <p:messages id="messages" closable="true" autoUpdate="true"  />
    <div align="left">
        <p:panelGrid styleClass="userPanel">                            
            <p:row>                                
                <p:column colspan="4">
                    <p:inputText id="street" value="" size="67" maxlength="100" required="true" requiredMessage="Street is required" />
                </p:column>
            </p:row>                            
            <p:row>
                <p:column colspan="4">
                    <div align="center">
                        <p:commandButton action="#{userController.add}" rendered="#{mode eq 'add'}" value="Add" ajax="false" update=":saveUserForm"/>
                        <p:commandButton action="#{userController.update}" rendered="#{mode ne 'add'}" value="Update" ajax="false" update=":saveUserForm"/>
                        <p:commandButton action="#{userController.prepareList}" value="Cancel" immediate="true"/>
                    </div>
                </p:column>
            </p:row>
        </p:panelGrid>
    </div>
  </p:panel>
</h:form>

Not sure why I am seeing the requiredMessage twice. Any ideas?

EDIT : Adding growl code for master template

<p:growl id="messages" showDetail="true" sticky="true" autoUpdate="true"/>

Screenshot of what I see :

enter image description here

Best Answer

Remove showDetail="true". Its default value is false.

Related Topic