org.apache.tapestry.portlet
Class PortletExceptionPresenter

java.lang.Object
  extended by org.apache.tapestry.portlet.PortletExceptionPresenter
All Implemented Interfaces:
ExceptionPresenter

public class PortletExceptionPresenter
extends Object
implements ExceptionPresenter

Service used to present a runtime exception to the user. This is very tricky in the Portlet world because of the split between the action and render requests (much more likely to get an error during the action request than during the render request, but both are possible).

During an action request, this code will render the HTML markup for the exception into a buffer that is stored as persistent attribute in the portal session.

Since:
4.0
Author:
Howard M. Lewis Ship

Constructor Summary
PortletExceptionPresenter()
           
 
Method Summary
 void presentException(IRequestCycle cycle, Throwable cause)
          Report the exception and provide some response to the user in lieu of the expected result page.
 void setGlobals(PortletRequestGlobals globals)
           
 void setMarkupWriterSource(MarkupWriterSource markupWriterSource)
           
 void setRenderStrategy(RenderStrategy renderStrategy)
           
 void setRequest(WebRequest request)
           
 void setRequestExceptionReporter(RequestExceptionReporter requestExceptionReporter)
           
 void setResponse(WebResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortletExceptionPresenter

public PortletExceptionPresenter()
Method Detail

presentException

public void presentException(IRequestCycle cycle,
                             Throwable cause)
Description copied from interface: ExceptionPresenter
Report the exception and provide some response to the user in lieu of the expected result page.

Specified by:
presentException in interface ExceptionPresenter
Parameters:
cycle - the current request cycle
cause - the exception that was caught

setGlobals

public void setGlobals(PortletRequestGlobals globals)

setRenderStrategy

public void setRenderStrategy(RenderStrategy renderStrategy)

setRequest

public void setRequest(WebRequest request)

setRequestExceptionReporter

public void setRequestExceptionReporter(RequestExceptionReporter requestExceptionReporter)

setResponse

public void setResponse(WebResponse response)

setMarkupWriterSource

public void setMarkupWriterSource(MarkupWriterSource markupWriterSource)


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.