I have a command button with an action that returns a new URL to redirect to. When this command button is not inside the p:dialog all works as I would expect, but when I put the command button in the dialog then the dialog just closes and leaves me on the same page.
<h:form id="reviewForm">
<h:messages id="saveMsg" showDetail="true" globalOnly="true"/>
<p:panel style="text-align: center">
<p:commandButton type="button" value="Submit" onclick="showOptions(); areYouSureVar.show();" />
</p:panel>
<p:dialog id="areYouSure" widgetVar="areYouSureVar" resizable="false" width="400" modal="true" header="Are you sure you want to continue?">
<p:panel style="text-align: center">
<p:commandButton id="submit" ajax="false" value="Submit" action="#{mybean.myaction}" oncomplete="areYouSureVar.hide();"/>
<p:commandButton type="button" value="Cancel" onclick="areYouSureVar.hide();"/>
</p:panel>
</p:dialog>
</h:form>
mybean.action returns a string that points to another page, but that page never loads, the dialog goes away and that is all.