JSF & PrimeFaces & Spring tutorial 17: PrimeFaces Confirm Dialog

Using Confirm Dialog component in PrimeFaces.

download result: https://app.box.com/s/2yo3c2y001qb1u18tgnq

index.xhtml:
<p:commandButton value="remove" action="#{checkListController.remove(check)}" 
		update=":checkTable, :messages">
	<p:confirm header="Confirmation" message="Are you sure?" icon="ui-icon-alert" />
</p:commandButton>
index.xhtml:
<h:form>
<p:confirmDialog global="true">
        <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>