/** * Invoked by {@link #service(WebRequest, WebResponse)} if a {@link StaleLinkException} is * thrown by the {@link IEngineService service}. This implementation sets the message property * of the StaleLink page to the message provided in the exception, then invokes * {@link #redirect(String, IRequestCycle, ApplicationRuntimeException)} to render the StaleLink * page. * <p> * Subclasses may overide this method (without invoking this implementation). A better practice * is to contribute an alternative implementation of * {@link org.apache.tapestry.error.StaleLinkExceptionPresenter} to the * tapestry.InfrastructureOverrides configuration point. * <p> * A common practice is to present an error message on the application's Home page. Alternately, * the application may provide its own version of the StaleLink page, overriding the framework's * implementation (probably a good idea, because the default page hints at "application errors" * and isn't localized). The overriding StaleLink implementation must implement a message * property of type String. * * @since 0.2.10 */ protected void handleStaleLinkException(IRequestCycle cycle, StaleLinkException exception) throws IOException { _infrastructure.getStaleLinkExceptionPresenter().presentStaleLinkException(cycle, exception); }
/** * Invoked by {@link #service(WebRequest, WebResponse)} if a {@link StaleLinkException} is * thrown by the {@link IEngineService service}. This implementation sets the message property * of the StaleLink page to the message provided in the exception, then invokes * {@link #redirect(String, IRequestCycle, ApplicationRuntimeException)} to render the StaleLink * page. * <p> * Subclasses may overide this method (without invoking this implementation). A better practice * is to contribute an alternative implementation of * {@link org.apache.tapestry.error.StaleLinkExceptionPresenter} to the * tapestry.InfrastructureOverrides configuration point. * <p> * A common practice is to present an error message on the application's Home page. Alternately, * the application may provide its own version of the StaleLink page, overriding the framework's * implementation (probably a good idea, because the default page hints at "application errors" * and isn't localized). The overriding StaleLink implementation must implement a message * property of type String. * * @since 0.2.10 */ protected void handleStaleLinkException(IRequestCycle cycle, StaleLinkException exception) throws IOException { _infrastructure.getStaleLinkExceptionPresenter().presentStaleLinkException(cycle, exception); }