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
HandlesFormsRequirePostExceptions (thrown by theFormcomponent when the request method was other than post) by redirecting to the page containing the form.This assistant is contributed to the default
RequestExceptionHandlerservice 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.ObjecthandleRequestException(java.lang.Throwable exception, java.util.List<java.lang.Object> exceptionContext)Handles the exception, returning a page class or link to redirect to.
-
-
-
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: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:
java.io.IOException
-
-