title: Primefaces messages in a dialog is not displayed
body: <p>I'm using Primefaces, and have a login dialog:</p>
  
  <pre><code>&lt;p:dialog widgetVar="dlgLogin" header="Login" modal="true"&gt;
          &lt;p:outputPanel&gt;
              &lt;h:form&gt;
                  &lt;p:messages for="msgLogin" autoUpdate="true" closable="true" showSummary="true" showDetail="false" severity="error"/&gt;
                  &lt;p:panel&gt;
                      &lt;h:panelGrid columns="2"&gt;
                          &lt;p:outputLabel value="User Name"/&gt;
                          &lt;p:inputText id="userName" value="#{loginBean.userName}"
                                       required="true" requiredMessage="User Name is required"/&gt;
  
                          &lt;p:outputLabel value="Password"/&gt;
                          &lt;p:password id="password" value="#{loginBean.password}"
                                      required="true" requiredMessage="Password is required"/&gt;
                      &lt;/h:panelGrid&gt;
                  &lt;/p:panel&gt;
                  &lt;p:commandButton icon="ui-icon-arrowrefresh-1-n" value="Cancel" onclick="PF('dlgLogin').hide()"/&gt;
                  &lt;p:commandButton type="submit" value="Login" 
                                   ajax="false" validateClient="true"
                                   oncomplete="handleClose(xhr, status, args);"
                                   action="#{loginBean.login}"/&gt;
              &lt;/h:form&gt;
          &lt;/p:outputPanel&gt;
      &lt;/p:dialog&gt;
  </code></pre>
  
  <p>Submitting the login is on purpose non ajax, so the entire page will be refreshed.</p>
  
  <p>The server code is:</p>
  
  <pre><code>FacesContext.getCurrentInstance().addMessage("msgLogin", new FacesMessage(FacesMessage.SEVERITY_ERROR, "Wrong User Name or Password.", "Wrong User Name or Password."));
  </code></pre>
  
  <p>In case that the login fails in the server, I would like to display a message, and leave the dialog open. but it doesn't work.</p>
  
  <p>How can that be done?</p>
  
  <p>Thanks.</p>