On Thu, 26 Jun 2014 04:35:52 -0300, Davide Vecchi <d...@amc.dk> wrote:

I believe I'm actually decorating; this is a trimmed version of the code:

-------------------------------
In AppModule.java :

                @Match("RequestExceptionHandler")
public static RequestExceptionHandler decorateRequestExceptionHandler(final Logger logger, final ResponseRenderer renderer, final ComponentSource componentSource, @Symbol(SymbolConstants.PRODUCTION_MODE) boolean productionMode, Object service)
                {
return new RequestExceptionHandlerImpl(componentSource);
                }

That's Tapestry-IoC service decoration for sure! :)

public class RequestExceptionHandlerImpl implements RequestExceptionHandler
{
                ....

public RequestExceptionHandlerImpl(ComponentSource componentSource)
                {
                                this.componentSource = componentSource;
                }

                @Override
public void handleRequestException(Throwable exception) throws IOException
                {
                                // Log the exception :
                                ....

                                // Redirect to previous page :

Component previousPage = getPreviousPage(request, this.componentEventLinkEncoder, this.componentSource);

Link redirectTo = this.pageRenderLinkSource.createPageRenderLink(previousPage.getClass());

                                response.sendRedirect(redirectTo);
                }

Is this method invoking super.handleRequestException()? If yes, you don't have to do anything.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to