The commandButton command generates a POST request that submits the form data containing the button to the server. If you want to present only the input data of the form in a dialog box, close the dialog with <h:form> and, to avoid the problem of nesting forms, use the appendToBody attribute in the dialog box, for example:
<p:dialog appendToBody="true"> <h:form> </h:form> </p:dialog>
The dialogue form of this method will be outside the parent form.
source share