Package org.apache.tapestry5.internal
Class FormsRequirePostExceptionHandlerAssistant
java.lang.Object
org.apache.tapestry5.internal.FormsRequirePostExceptionHandlerAssistant
- All Implemented Interfaces:
ExceptionHandlerAssistant
public class FormsRequirePostExceptionHandlerAssistant
extends Object
implements ExceptionHandlerAssistant
Handles
FormsRequirePostExceptions (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:
-
Constructor Summary
ConstructorsConstructorDescriptionFormsRequirePostExceptionHandlerAssistant(ComponentSource componentSource, PageRenderLinkSource linkSource) -
Method Summary
Modifier and TypeMethodDescriptionhandleRequestException(Throwable exception, List<Object> exceptionContext) Handles the exception, returning a page class or link to redirect to.
-
Constructor Details
-
FormsRequirePostExceptionHandlerAssistant
public FormsRequirePostExceptionHandlerAssistant(ComponentSource componentSource, PageRenderLinkSource linkSource)
-
-
Method Details
-
handleRequestException
public Object handleRequestException(Throwable exception, List<Object> exceptionContext) throws IOException Description copied from interface:ExceptionHandlerAssistantHandles the exception, returning a page class or link to redirect to.- Specified by:
handleRequestExceptionin interfaceExceptionHandlerAssistant- Parameters:
exception- the exception as thrownexceptionContext- 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:
IOException
-