'Exit' button and validations
974835Jan 14 2013 — edited Jan 14 2013Hi,
I have a form with an 'Exit' button.
Also there are some validations on fields in this form.
When the user click on the 'Exit' button I would like to show a popup dialog with question if the user wants to save his changes.
if the user choose 'yes', I want the validations to work and to throw error messages if needed.
and in case the user chose 'no', it will rollback all changes without validations.
I don't know how to implement it.
If I define the 'Exit' button with immediate="true" the validations are thrown the moment he clicks before he gets the popup with the question.
Also I was trying to define the 'Exit' button with immediate="false"
and I added custom buttons to the dialog with 'Yes' button immediate="true".
but it skips the validations.
any idea?
Thanks