title: PrimeFaces BlockUI does not work
body: <p>I have a JSF page with one button. When button clicked I redirect another page after doing some database process. I want to use BlockUI because redirecting take some time. I added primeface BlockUI component but it do not work for me. I looked <a href="http://www.primefaces.org/showcase/ui/blockUI.jsf" rel="nofollow">PrimeFaces showcase page</a> but I can not do.</p>
  
  <p>My JSF page (xhtml)</p>
  
  <pre><code>&lt;h:body&gt;
      &lt;h:form id="form1"&gt;    
          &lt;div align="center"&gt;
              &lt;p:button id="btn1" value="database" outcome="database" /&gt;
              &lt;p:blockUI block="form1" trigger="btn1"&gt;  
                  &lt;p&gt;Database process&lt;/p&gt;&lt;br /&gt;
                  &lt;p:graphicImage value="http://www.primefaces.org/showcase/images/loading.gif"/&gt;  
              &lt;/p:blockUI&gt;
          &lt;/div&gt;
       &lt;/h:form&gt;
  &lt;/h:body&gt;
  </code></pre>
  
  <hr>
  
  <p>BlockUI worked after I changed p:button with p:commandButton</p>
  
  <pre><code>&lt;p:commandButton id="btn2" value="database" action="#{class.func()}" /&gt;
  </code></pre>
  
  <p>and my func() is</p>
  
  <pre><code>public void func()
  {
      return "database.xhtml";
  }
  </code></pre>