title: Can't redirect to other page when clicking a commandButton in dialog
body: <p>Hi guys I try to make a dialog, it's like when click submit the dialog will show up and if you click Ok it will redirect to other page but when I try click it its's doesnt work how to fixed it ??</p>
  
  <p>this the code</p>
  
  <pre><code>&lt;p:dialog modal="true" widgetVar="successDialog" header="Info"
                      closable="false" appendTo="@(body)"&gt;
                      &lt;h:panelGrid columns="1" cellpadding="2"&gt;
                          &lt;h:outputText value="Save data berhasil" /&gt;
                          &lt;center&gt;
                              &lt;p:commandButton value="Ok"
                                  action="/prpk_paperless/master_prpk.xhtml?faces-redirect=true"
                                  onclick="PF('successDialog').hide()" immediate="true"/&gt;
                          &lt;/center&gt;
                      &lt;/h:panelGrid&gt;
                  &lt;/p:dialog&gt; 
  
  
  
                  &lt;p:dialog modal="false" widgetVar="failedDialog" header="Info"
                      closable="false"&gt;
                      &lt;h:panelGrid columns="1" cellpadding="2"&gt;
                          &lt;h:outputText value="Save data failed" /&gt;
                          &lt;center&gt;
                              &lt;p:commandButton value="Ok" action="#"
                                  onclick="PF('failedDialog').hide()" /&gt;
                          &lt;/center&gt;
                      &lt;/h:panelGrid&gt;
                  &lt;/p:dialog&gt;
  </code></pre>
  
  <p>thank you..</p>