Custom dialog component is one of the components that can be used across the pages declaratively with little code.
This could in following cases
* Displaying custom messages like "Your changes have been saved "(Could also be done using FacesMessage)
* Confirmation dialog where we ask user if he/she want to go ahead or not like "Do you want to save the changes?".
* Custom confirmation dialog like "Would you like to create personal or business address?" with 2 buttons.
You can download the source application with test application here.