Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)
E15995-06


oracle.adf.view.rich.error.portlet
Class DefaultErrorRenderer

java.lang.Object
  extended by javax.faces.render.Renderer
      extended by org.apache.myfaces.trinidad.render.CoreRenderer
          extended by oracle.adfinternal.view.faces.renderkit.rich.portlet.PortletErrorRenderer
              extended by oracle.adfinternal.view.faces.renderkit.rich.portlet.DefaultErrorRenderer
                  extended by oracle.adf.view.rich.error.portlet.DefaultErrorRenderer


public class DefaultErrorRenderer
extends oracle.adfinternal.view.faces.renderkit.rich.portlet.DefaultErrorRenderer

Default PortletErrorRenderer implementation for rendering errors that have occured for a portlet. This renderer renders a simple message for most exceptions, indicating if the problem is with the consumer or producer.

In addition, it handles ExternalAppCredentialException by rendering a link a user can use to perform external application authentication.

Override getMessageForException(java.lang.Throwable) to customize the text of the message that appears based on the exception.

encodeErrorMessage(javax.faces.context.FacesContext, java.lang.Throwable) can be overridden to determine how the message is rendered.

See Also:
oracle.adf.view.rich.portlet.error.PortletErrorRenderer

Field Summary

 

Fields inherited from class oracle.adfinternal.view.faces.renderkit.rich.portlet.PortletErrorRenderer
_portletExceptionKey, RENDERER_TYPE

 

Fields inherited from class org.apache.myfaces.trinidad.render.CoreRenderer
CHAR_UNDEFINED, NO_CHILD_INDEX

 

Constructor Summary
DefaultErrorRenderer()
           

 

Method Summary
protected  void encodeAll(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, javax.faces.component.UIComponent component, org.apache.myfaces.trinidad.bean.FacesBean bean)
          Called to encode the output from this rendered when an error occurs.
protected  void encodeError(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, javax.faces.component.UIComponent component, org.apache.myfaces.trinidad.bean.FacesBean bean)
          Render the error.
protected  void encodeErrorMessage(javax.faces.context.FacesContext context, java.lang.Throwable t)
          Encode a message to be shown to the user for the exception that ocurred.
protected  java.lang.String getMessageForException(java.lang.Throwable t)
          Get the message text to be show to the user for the given exception.
protected  boolean hidePortlet(java.lang.Throwable t)
          Should the Portlet be seen given the error that occured.
 boolean hideShowDetailFrame(org.apache.myfaces.trinidad.bean.FacesBean bean)
          Should the Portlet ShowDetailFrame chrome be shown given the error that occurred.
protected  boolean hideShowDetailFrame(java.lang.Throwable t)
          Should the Portlet ShowDetailFrame chrome be shown given the error that occured.

 

Methods inherited from class oracle.adfinternal.view.faces.renderkit.rich.portlet.DefaultErrorRenderer
encodeExternalAppCredentialException

 

Methods inherited from class oracle.adfinternal.view.faces.renderkit.rich.portlet.PortletErrorRenderer
findTypeConstants, getPortletException, getRendersChildren

 

Methods inherited from class org.apache.myfaces.trinidad.render.CoreRenderer
afterEncode, beforeEncode, delegateRenderer, delegateRendererBegin, delegateRendererEnd, encodeAllChildren, encodeBegin, encodeBegin, encodeChild, encodeChildren, encodeEnd, encodeEnd, getClientId, getFacesBean, getFacet, getNextRenderedChildIndex, getRenderedChildCount, getRenderedFacetsAndChildren, getRenderingProperty, hasRenderedChildren, isDesktop, isGecko, isGenericPDA, isIE, isInaccessibleMode, isIPhone, isKonqueror, isNokiaS60, isPDA, isScreenReaderMode, isWebKit, partialEncodeVisit, renderEncodedActionURI, renderEncodedResourceURI, renderId, renderStyleClass, renderStyleClasses, setRenderingProperty, setupEncodingContext, setupEncodingContext, shouldRenderId, skipDecode, tearDownEncodingContext, tearDownEncodingContext, toActionUri, toChar, toInt, toLong, toResourceUri, toString, toUri

 

Methods inherited from class javax.faces.render.Renderer
convertClientId, decode, getConvertedValue

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

DefaultErrorRenderer

public DefaultErrorRenderer()

Method Detail

encodeAll

protected void encodeAll(javax.faces.context.FacesContext context,
                         org.apache.myfaces.trinidad.context.RenderingContext arc,
                         javax.faces.component.UIComponent component,
                         org.apache.myfaces.trinidad.bean.FacesBean bean)
                  throws java.io.IOException
Called to encode the output from this rendered when an error occurs. This implementation renders the external app authentication link, if the exception is oracle.portlet.client.extapp.ExternalAppCredentialException or calls encodeError(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext, javax.faces.component.UIComponent, org.apache.myfaces.trinidad.bean.FacesBean) otherwise.
Overrides:
encodeAll in class oracle.adfinternal.view.faces.renderkit.rich.portlet.DefaultErrorRenderer
Parameters:
context - the FacesContext
arc - the RenderingContext
component - the Portlet UIComponent for which the error is being rendered.
bean - the FacesBean for this renderer.
Throws:
java.io.IOException

encodeError

protected void encodeError(javax.faces.context.FacesContext context,
                           org.apache.myfaces.trinidad.context.RenderingContext arc,
                           javax.faces.component.UIComponent component,
                           org.apache.myfaces.trinidad.bean.FacesBean bean)
                    throws java.io.IOException
Render the error. This implementation renders nothing if hidePortlet(java.lang.Throwable) returns true or calls encodeErrorMessage(javax.faces.context.FacesContext, java.lang.Throwable) otherwise.
Overrides:
encodeError in class oracle.adfinternal.view.faces.renderkit.rich.portlet.DefaultErrorRenderer
Parameters:
context - the FacesContext.
arc - the RenderingContext.
component - the Portlet UIComponent we are rendering the error for.
bean - the FacesBean for this renderer.
Throws:
java.io.IOException

encodeErrorMessage

protected void encodeErrorMessage(javax.faces.context.FacesContext context,
                                  java.lang.Throwable t)
                           throws java.io.IOException
Encode a message to be shown to the user for the exception that ocurred. The default implementation uses getMessageForException(java.lang.Throwable) to get the message text to display to the user.
Overrides:
encodeErrorMessage in class oracle.adfinternal.view.faces.renderkit.rich.portlet.DefaultErrorRenderer
Parameters:
context - the FacesContext
t - the Throwable that occurred
Throws:
java.io.IOException

getMessageForException

protected java.lang.String getMessageForException(java.lang.Throwable t)
Get the message text to be show to the user for the given exception. Called from encodeErrorMessage(javax.faces.context.FacesContext, java.lang.Throwable).
Overrides:
getMessageForException in class oracle.adfinternal.view.faces.renderkit.rich.portlet.DefaultErrorRenderer
Parameters:
t - the Throwable to producer the message for.
Returns:
the message to display to the user.

hideShowDetailFrame

public final boolean hideShowDetailFrame(org.apache.myfaces.trinidad.bean.FacesBean bean)
Should the Portlet ShowDetailFrame chrome be shown given the error that occurred. Called to determine if the portlet should be hidden completely.
Overrides:
hideShowDetailFrame in class oracle.adfinternal.view.faces.renderkit.rich.portlet.DefaultErrorRenderer
Parameters:
bean -
Returns:
boolean indicating whether to hide the portlet.
See Also:
hideShowDetailFrame(Throwable)

hideShowDetailFrame

protected boolean hideShowDetailFrame(java.lang.Throwable t)
Should the Portlet ShowDetailFrame chrome be shown given the error that occured. This implementation returns the value hidePortlet(java.lang.Throwable).
Overrides:
hideShowDetailFrame in class oracle.adfinternal.view.faces.renderkit.rich.portlet.DefaultErrorRenderer
Parameters:
t - the Throwable that occured
Returns:
boolean indicating whether the chrome should be seen.

hidePortlet

protected boolean hidePortlet(java.lang.Throwable t)
Should the Portlet be seen given the error that occured. This is called by the default implementations of hideShowDetailFrame(Throwable) and encodeError(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext, javax.faces.component.UIComponent, org.apache.myfaces.trinidad.bean.FacesBean) to determine if the portlet chrome and error rendition should be shown.
Overrides:
hidePortlet in class oracle.adfinternal.view.faces.renderkit.rich.portlet.DefaultErrorRenderer
Parameters:
t - the Throwable that occured
Returns:
boolean indicating whether the portlet should be seen.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)
E15995-06


Copyright © 2009, 2013, Oracle and/or its affiliates. All rights reserved.