Error Handling Demo

This demo explains how the error handling in JSF Dialogs can be customized.

HTTP Request

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.

AJAX Request

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 .

View Expired Exception

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 .