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
    Constructor
    Description
    ImixsExceptionHandler(jakarta.faces.context.ExceptionHandler wrapped)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    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

    Methods inherited from class jakarta.faces.context.ExceptionHandlerWrapper

    getHandledExceptionQueuedEvent, getHandledExceptionQueuedEvents, getRootCause, getUnhandledExceptionQueuedEvents, getWrapped, isListenerForSource, processEvent

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ImixsExceptionHandler

      public ImixsExceptionHandler(jakarta.faces.context.ExceptionHandler wrapped)
  • Method Details

    • handle

      public void handle()
      Overrides:
      handle in class jakarta.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 -