How to handle only perffaces dialog in commandButton action?

My problem. I have a punch dialog (modal window). Inside there is a command button. When I open a dialog box and press the Commandbutton button, the input data outside and behind the dialog is also checked. I want to process only the input inside the dialog.

It is important to say that I am adding a dialog to my page. The dialog is in another file (including).

I tried using the process = "dialog id" attribute, but it didn't work.

Can anybody help me?

+4
source share
1 answer

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.

+5
source

All Articles