Package org.imixs.workflow.office.util
Class ImixsExceptionHandler
java.lang.Object
jakarta.faces.context.ExceptionHandler
jakarta.faces.context.ExceptionHandlerWrapper
org.imixs.workflow.office.util.ImixsExceptionHandler
- All Implemented Interfaces:
jakarta.faces.event.FacesListener,jakarta.faces.event.SystemEventListener,jakarta.faces.FacesWrapper<jakarta.faces.context.ExceptionHandler>,EventListener
public class ImixsExceptionHandler
extends jakarta.faces.context.ExceptionHandlerWrapper
The ImixsExceptionHandler handles Imixs WorkflowExceptions as also EJB
Exceptions.
In base of a Imixs WorkflowException the ExceptionHandler adds a new
FacesMessage with the root cause of the problem. This kind of message
can be simply displayed with a
<h:messages id="globalMessages" globalOnly="true" /> tag.
In case of an EJB Exception this ExceptionHandler redirects to the page
error.xhml page to display a user-friendly version of
those exceptions.
See also the book ' The Definitive Guide to JSF in Java EE' by Bauke Scholtz and Arjan Tijms: https://link.springer.com/book/10.1007/978-1-4842-3387-0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandle()voidhandleImixsWorkflowException(jakarta.faces.context.FacesContext context) This method check if the root cause is an instance of Imixs WorkflowException, and if so, it will add a faces messageMethods inherited from class jakarta.faces.context.ExceptionHandlerWrapper
getHandledExceptionQueuedEvent, getHandledExceptionQueuedEvents, getRootCause, getUnhandledExceptionQueuedEvents, getWrapped, isListenerForSource, processEvent
-
Constructor Details
-
ImixsExceptionHandler
public ImixsExceptionHandler(jakarta.faces.context.ExceptionHandler wrapped)
-
-
Method Details
-
handle
public void handle()- Overrides:
handlein classjakarta.faces.context.ExceptionHandlerWrapper
-
handleImixsWorkflowException
public void handleImixsWorkflowException(jakarta.faces.context.FacesContext context) This method check if the root cause is an instance of Imixs WorkflowException, and if so, it will add a faces message- Parameters:
context-
-