Since Tobago 4.0.0 an AjaxExceptionHandler takes care of exceptions in ajax case.

Important! The exception has to be thrown before the renderer phase. This is the case, in normal actions, but if you need e. g. some initialization of data in a page, you can achieve that with an `<f:event type="preRenderView" listener="\#{bean.doSomeCriticalWork}"/>`.

The AjaxExceptionHandler take the first exception that occurs and try to find a proper error page. Error pages are defined in the web.xml.

If no proper error page could be found, the error page for error code 500 is displayed instead. If no 500-error-page is defined, the general error page (no exceptiontype or error code defined) is used.

If there is no ajax case, the error page could not be found or the renderer phase is active, the AjaxExceptionHandler do nothing and let JSF handle the exception.

The output field is updated after an change event of the input field.

Set the input value to 'x' to throw an exeption.

This example use the `<f:event type="preRenderView"/>` tag.

An exceptions is thrown after page 7 or higher is selected.