org.apache.myfaces.trinidadinternal.renderkit.core.xhtml
Class PartialPageUtils

java.lang.Object
  extended by org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PartialPageUtils

public final class PartialPageUtils
extends java.lang.Object

Utility methods for Renderers which support partial page rendering.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/renderkit/core/xhtml/PartialPageUtils.java#0 $) $Date: 10-nov-2005.19:01:41 $

Method Summary
static boolean containsPprTargets(org.apache.myfaces.trinidad.context.RenderingContext rc, javax.faces.component.UIComponent component, java.lang.String clientId)
          Check if a NamingContainer has any partial targets
static org.apache.myfaces.trinidad.context.PartialPageContext createPartialPageContext(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RequestContext afContext)
           
static void forceOptimizedPPR(javax.faces.context.FacesContext context)
          Forces optimized PPR (using tree visit to render components)
static void forcePartialRendering(javax.faces.context.FacesContext context)
          Force partial rendering on for requests that may not have sent a "partial" parameter.
static boolean isOptimizedPPREnabled(javax.faces.context.FacesContext context, boolean checkIsPPR)
          Returns true if optimized PPR is enabled for this request.
static boolean isPartialRenderingPass(org.apache.myfaces.trinidad.context.RenderingContext arc)
          Returns true if we are performing a partial page render.
static boolean isPartialRequest(javax.faces.context.FacesContext context)
          This method delegates to the RequestContext.isPartialRequest() with the exception that JSF Ajax render="@all" requests are reported as non-partial
static boolean isPPRActive(javax.faces.context.FacesContext context)
          Test if PPR is active during rendering.
static void markPPRActive(javax.faces.context.FacesContext context)
          Mark that PPR is in fact active during rendering.
static void renderNoopResponse(javax.faces.context.FacesContext context)
          This method writes a to the response.
static boolean supportsBlocking(org.apache.myfaces.trinidad.context.RenderingContext arc)
           
static boolean supportsPartialRendering(org.apache.myfaces.trinidad.context.RenderingContext arc)
          Tests whether partial page rendering is supported for the current render.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isOptimizedPPREnabled

public static boolean isOptimizedPPREnabled(javax.faces.context.FacesContext context,
                                            boolean checkIsPPR)
Returns true if optimized PPR is enabled for this request.

Returns:
true if optimized PPR is enabled for this request

containsPprTargets

public static boolean containsPprTargets(org.apache.myfaces.trinidad.context.RenderingContext rc,
                                         javax.faces.component.UIComponent component,
                                         java.lang.String clientId)
Check if a NamingContainer has any partial targets


isPartialRequest

public static boolean isPartialRequest(javax.faces.context.FacesContext context)
This method delegates to the RequestContext.isPartialRequest() with the exception that JSF Ajax render="@all" requests are reported as non-partial

Parameters:
context -
Returns:

forcePartialRendering

public static void forcePartialRendering(javax.faces.context.FacesContext context)
Force partial rendering on for requests that may not have sent a "partial" parameter.


createPartialPageContext

public static org.apache.myfaces.trinidad.context.PartialPageContext createPartialPageContext(javax.faces.context.FacesContext context,
                                                                                              org.apache.myfaces.trinidad.context.RequestContext afContext)

isPartialRenderingPass

public static boolean isPartialRenderingPass(org.apache.myfaces.trinidad.context.RenderingContext arc)
Returns true if we are performing a partial page render.


supportsPartialRendering

public static boolean supportsPartialRendering(org.apache.myfaces.trinidad.context.RenderingContext arc)
Tests whether partial page rendering is supported for the current render.

Partial page rendering is not supported on all user agents. This method returns false if partial page rendering is not supported by the agent associated with the provided RenderingContext.

This method returns false if the disable-partial-rendering configuration element is set to true. Otherwise, this method returns true. (PPR is considered accessible, so we do not check the accessibility mode)


supportsBlocking

public static boolean supportsBlocking(org.apache.myfaces.trinidad.context.RenderingContext arc)

isPPRActive

public static boolean isPPRActive(javax.faces.context.FacesContext context)
Test if PPR is active during rendering.


markPPRActive

public static void markPPRActive(javax.faces.context.FacesContext context)
Mark that PPR is in fact active during rendering.


forceOptimizedPPR

public static void forceOptimizedPPR(javax.faces.context.FacesContext context)
Forces optimized PPR (using tree visit to render components)

Parameters:
context -

renderNoopResponse

public static void renderNoopResponse(javax.faces.context.FacesContext context)
                               throws java.io.IOException
This method writes a to the response.

Parameters:
context - the FacesContext
Throws:
java.io.IOException


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.