Package org.apache.tapestry5.internal

## Class FormsRequirePostExceptionHandlerAssistant

- java.lang.Object
- - org.apache.tapestry5.internal.FormsRequirePostExceptionHandlerAssistant

- All Implemented Interfaces:
    `ExceptionHandlerAssistant`

      public class FormsRequirePostExceptionHandlerAssistant
      extends java.lang.Object
      implements ExceptionHandlerAssistant

  Handles `FormsRequirePostException`s (thrown by the `Form` component when the request method was other than post) by redirecting to the page containing the form.

  This assistant is contributed to the default `RequestExceptionHandler` service in a way that it is effective only in production mode.

  Since:
    5.8.3
  See Also:
    `ExceptionHandlerAssistant`, `RequestExceptionHandler`, `SymbolConstants.PRODUCTION_MODE`

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FormsRequirePostExceptionHandlerAssistant​(ComponentSource componentSource, PageRenderLinkSource linkSource)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.Object` | `handleRequestException​(java.lang.Throwable exception, java.util.List<java.lang.Object> exceptionContext)` | Handles the exception, returning a page class or link to redirect to.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FormsRequirePostExceptionHandlerAssistant

          public FormsRequirePostExceptionHandlerAssistant​(ComponentSource componentSource,
                                                           PageRenderLinkSource linkSource)

  - ### Method Detail

    - #### handleRequestException

          public java.lang.Object handleRequestException​(java.lang.Throwable exception,
                                                         java.util.List<java.lang.Object> exceptionContext)
                                                  throws java.io.IOException

      Description copied from interface: `ExceptionHandlerAssistant`
      Handles the exception, returning a page class or link to redirect to.
      Specified by:
        `handleRequestException` in interface `ExceptionHandlerAssistant`
      Parameters:
        `exception` - the exception as thrown
        `exceptionContext` - a page activation context that is derived from the root-most exception
      Returns:
        either a page class or a `Link`; a page will be redirected to, with the exception context as the page activation context
      Throws:
        `java.io.IOException`