The other PrimeFaces component we see in our page is <p:dialog> , this component
renders as a popup that can overlay other components on the page. The value of its
widgetVar attribute can be used to access the component from other components on
The most commonly used functions of this client API are show() and hide() , used to
display or hide the dialog on the page. We can see the client API in action as the value
of the onclick attribute of the commandButton we discussed earlier.
When we run our application, we can see the automatically generated page in action.
When we click on the button, the dialog is displayed.