<h:panelGrid columns="1" cellpadding="5"> <a:commandButton value="Basic" type="button" onclick="PF('dlg1').show();" /> <a:commandButton value="Modal" type="button" onclick="PF('dlg2').show();" /> <a:commandButton value="Effects" type="button" onclick="PF('dlg3').show();" /> </h:panelGrid> <a:dialog header="Basic Dialog" widgetVar="dlg1" minHeight="40"> <h:outputText value="Resistance to PrimeFaces is futile!" /> </a:dialog> <a:dialog header="Modal Dialog" widgetVar="dlg2" modal="true" height="100"> <h:outputText value="This is a Modal Dialog." /> </a:dialog> <a:dialog header="Effects" widgetVar="dlg3" showEffect="explode" hideEffect="bounce" height="100"> <h:outputText value="This dialog has nice effects." /> </a:dialog>