Confirm Dialog ConfirmDialog is integrated with confirm behavior and used as a replacement for the javascript confirmation utility.
<h:form>           
    <p:growl id="message" showDetail="true" />

    <p:commandButton value="Destroy the World" actionListener="#{dialogView.destroyWorld}" update="message">
        <p:confirm header="Confirmation" message="Are you sure?" icon="ui-icon-alert" />
    </p:commandButton>

    <p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
        <p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
        <p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
    </p:confirmDialog>
</h:form>
                
PrimeTek, Copyright © 2017
All rights reserved.
Running PrimeFaces-6.2-SNAPSHOT on Mojarra-2.3.2.