I have a confirmDialog and I need to do some action when the dialog is canceled. I've attached that action to 'close' button, but I need to do that also when user click 'x' icon in the top corner. How to do that?
I've tried ajax listener:
<p:confirmDialog appendToBody="true">
<p:ajax event="close" onstart="myAction()"/>
</p:confirmDialog>
but I've got an error:
Unable to attach to non-ClientBehaviorHolder parent