So i have this cancel button:
<p:commandButton id="cancelButton" value="Cancel" action="#{myBean.doOnCancel}" onclick="dialogWidget.hide();" />
The widget which the cancel button is on (<p:dialog>
) has a date field. Everytime i open the dialog, enter some valid values and click cancel - myBean.doOnCancel
gets executed and the dialog is hidden.
Now everytime i open the dialog, enter a single invalid value, such as a single letter instead of date, i get a validation message saying the date format is bad, then click cancel - the dialog is hidden but the method defined in action (myBean.doOnCancel
) is not executed.
Any idea why?