primefaces widgetVar Basic usage of widgetVar


Example

<h:form>
    <p:dialog widgetVar="myDialog"></p:dialog>
    <p:commandButton onclick="PF('myDialog').show();" />
</h:form>