I can make a p:confirm for a button that has an action, but when it's an onclick instead of an action-attribute, then clicking "Yes" in the dialog does nothing. Any tips how to make this work?
This works:
<p:commandButton action="#{customEditorBean.save}"
value="Save" rendered="#{customEditorBean.canSaveContent}">
<p:confirm message="Are you sure you want to save the content?" icon="ui-icon-alert" />
</p:commandButton>
This doesn't work:
<p:commandButton value="Close" onclick="PF('editorWidget').hide();">
<p:confirm message="Do you want to close the editor without saving?" icon="ui-icon-alert" />
</p:commandButton>