title: Primefaces p:messages autoupdate not working
body: <p>I m using autoUpdate property of p:messages but its not working , messages doesn't appears on web page.Interestingly if valdation fails then message get displayed</p>
  
  <p>Sample-</p>
  
  <p>xhtml-</p>
  
  <pre><code>&lt;h:form id="form_1"&gt;
    &lt;p:messages autoUpdate="true"  showDetail="true" id="msgs" /&gt;
    &lt;table&gt;
      &lt;tr&gt;
        &lt;td&gt;
          &lt;h:outputLabel id="label" style="width:100%" value="Name" /&gt;
        &lt;/td&gt;
        &lt;td&gt;
          &lt;p:inputText id="text" value="#{userweb.bindUser.uname}" /&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;
          &lt;h:outputLabel id="label_1" style="width:100%" value="Pwd" /&gt;
        &lt;/td&gt;
        &lt;td&gt;
          &lt;p:inputText id="text_1" value="#{userweb.bindUser.pwd}" /&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;
          &lt;h:outputLabel value=" " /&gt;
        &lt;/td&gt;
        &lt;td&gt;
          &lt;p:commandButton  id="button" value="Save" validateClient="true"&gt;
            &lt;p:ajax event="click" listener="#{userweb.saveUser()}" /&gt;
          &lt;/p:commandButton&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;           
  &lt;/h:form&gt;
  </code></pre>
  
  <p>ui.xhtml-</p>
  
  <pre><code>&lt;ui:composition xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:p="http://primefaces.org/ui" template="base.xhtml"&gt;
  
  
  &lt;ui:define name="body"&gt;
      &lt;h:body&gt;
  
          &lt;ui:include src="bodyMain.xhtml" /&gt;
  
  
  
          &lt;div id="container"&gt;
              &lt;div id="header" class="ui-widget ui-widget-header"&gt;
                  &lt;ui:include src="header.xhtml" /&gt;
              &lt;/div&gt;
              &lt;div id="page" class="ui-widget"&gt;
              &lt;div id="nav"&gt;
                  &lt;ui:include src="\leftmenu.xhtml"&gt;
                      &lt;ui:param name="menuItem" value="#{impaktNavigator}"&gt;&lt;/ui:param&gt;
                  &lt;/ui:include&gt;
  
              &lt;/div&gt;
              &lt;div id="content"&gt;
                  &lt;ui:insert name="content"&gt;...&lt;/ui:insert&gt;
              &lt;/div&gt;
  
              &lt;/div&gt;
              &lt;div class="clearfooter"&gt;&lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div id="footer" class="ui-widget ui-widget-header ui-corner-all"&gt;
              &lt;p&gt;Running on Impakt 1.1&lt;/p&gt;
          &lt;/div&gt;
  
  
  
  
      &lt;/h:body&gt;
  &lt;/ui:define&gt;
  </code></pre>
  
  <p></p>
  
  <p>base.xhtml-</p>
  
  <pre><code> &lt;html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:p="http://primefaces.org/ui"&gt;
  
   &lt;f:view contentType="text/html"&gt;
  
  &lt;h:head&gt;
      &lt;f:facet name="first"&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=Edge" /&gt;
      &lt;meta content='text/html; charset=UTF-8' http-equiv="Content-Type" /&gt;
          &lt;title&gt;Demo&lt;/title&gt;
  
      &lt;/f:facet&gt;
  
      &lt;h:outputStylesheet library="css" name="application.css" target="head" /&gt;
  
  
  
  
  
  &lt;/h:head&gt;
  
  &lt;ui:insert name="body"&gt;&lt;/ui:insert&gt;
  
  
  &lt;/f:view&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Java-</p>
  
  <pre><code>package webmodule;
  import java.io.Serializable;
  
  import javax.faces.application.FacesMessage;
  import javax.faces.application.FacesMessage.Severity;
  import javax.faces.context.FacesContext;
  
  import model.User;
  
  import org.omnifaces.util.Faces;
  import org.springframework.beans.factory.annotation.Autowired;
  
  
   public class Userweb implements Serializable 
   {
  
  User bindUser;
  
  @Autowired
  public void setBindUser(User bindUser) {
      this.bindUser = bindUser;
  }
  
  public User getBindUser() {
      return bindUser;
  }
  
  public void saveUser() throws Exception {
      String result = null;
      FacesMessage msg = new FacesMessage("Done", "It worked");
      FacesContext.getCurrentInstance().addMessage(null, msg);
  
  
      //return result;
  }
  
   }        
  </code></pre>
  
  <p>But if i remove autoUpdate and use following then it works-</p>
  
  <pre><code>&lt;p:ajax event="click" listener="#{userweb.saveUser()}" update="msgs" /&gt;
  </code></pre>
  
  <p>I m using-
  Primefaces 4.0
  jsf 2.2.6 (mojarra)
  Tomcat 7</p>
  
  <p>Plz help me out.....Thanks</p>