This demo explains how the error handling in JSF Dialogs can be customized.
If an exception occurs in a non-ajax HTTP request, the user will be redirected to the specified error page. The customization of these error pages are described in the engine guide.
If an exception occurs in an ajax-based HTTP request, the registered ajax exception handler comes into play. The ajax exception handler is defined in webContent/layouts/includes/exception.xhtml as p:ajaxExceptionHandler .
webContent/layouts/includes/exception.xhtml
p:ajaxExceptionHandler
If the view or the session of an user expires, there is a possibility to catch that exception with an ajax exception handler. In webContent/layouts/includes/exception.xhtml is a second p:ajaxExceptionHandler declared which will catch exceptions of type javax.faces.application.ViewExpiredException .
javax.faces.application.ViewExpiredException
Process: Element:
Developer-html-dialog-demos