title: JSF: How show 'waiting' message?
body: <p>i create a contact form, but now i want to show a wait message like 'sending message' for example.</p>
  
  <p>this is what i have done so far:</p>
  
  <pre><code>&lt;h:form styleClass="contact"&gt;
      &lt;h:inputText id="name" value="#{contact.client.name}" styleClass="text-input" &gt;
          &lt;f:ajax event="blur" render="nameMessage" /&gt;
      &lt;/h:inputText&gt;
      Name (Required)
      &lt;br /&gt;
      //..
  
      &lt;a4j:commandButton value="Do something" action="#{contact.sendMessage}" status="ajaxStatus" /&gt;
  
  
      &lt;!-- warning messages --&gt;
      &lt;h:messages globalOnly="true" errorClass="errorMessage" infoClass="infoMessage" showSummary="true" showDetail="true" /&gt;
      &lt;h:message id="nameMessage" for="name" errorClass="error" /&gt;&lt;br /&gt;
  &lt;/h:form&gt;
  
  &lt;a4j:status id="ajaxStatus" name="ajaxStatus"&gt;
      &lt;f:facet name="start"&gt;
          &lt;h:graphicImage name="loader.gif" library="images" /&gt;
          &lt;h:outputText value="Your message" /&gt;
      &lt;/f:facet&gt;
  &lt;/a4j:status&gt;
  </code></pre>
  
  <p><strong>Solution</strong>:
  Based in @roel tip:</p>
  
  <pre><code>    &lt;h:form styleClass="contact"&gt;
          &lt;h:inputText id="name" value="#{contact.client.name}" styleClass="text-input" &gt;
              &lt;f:ajax event="blur" render="nameMessage" /&gt;
          &lt;/h:inputText&gt;
          Nome (Obrigatório)
          //..        
          &lt;a4j:commandButton value="Enviar" action="#{contact.sendMessage}" styleClass="button" status="ajaxStatus" /&gt;
  
  
          &lt;!-- warning messages --&gt;
  &lt;!--         &lt;h:messages globalOnly="true" errorClass="errorMessage" infoClass="infoMessage" showSummary="true" showDetail="true" /&gt; --&gt;
          &lt;h:message id="nameMessage"    for="name"    errorClass="error" /&gt;&lt;br /&gt;
          //..
      &lt;/h:form&gt;
  
      &lt;a4j:status name="ajaxStatus"&gt;
          &lt;f:facet name="start"&gt;
              &lt;h:graphicImage name="loader.gif" library="images" /&gt;
              &lt;h:outputText value="Aguarde um momento ..." /&gt;
          &lt;/f:facet&gt;
      &lt;/a4j:status&gt;
  </code></pre>
  
  <p>But i don't know why is not working.
  Any idea ?</p>