org.apache.myfaces.trinidadinternal.renderkit.core.ppr
Class PartialPageContextImpl

java.lang.Object
  extended by org.apache.myfaces.trinidad.context.PartialPageContext
      extended by org.apache.myfaces.trinidadinternal.renderkit.core.ppr.PartialPageContextImpl

public class PartialPageContextImpl
extends org.apache.myfaces.trinidad.context.PartialPageContext

Context object which is used to track the targets of a partial page render during the partial page rendering pass. Clients never need to explicitly create PartialPageContext objects.

During the partial rendering pass, some Renderer implementations may modify the set of partial targets that are rendered. (For example, the FormRenderer adds a partial target for its shared hidden fields if any children of the form are rendered.) After the partial render pass, getPartialTargets() can be called to determine the actual set of partial targets that were rendered.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/renderkit/core/ppr/PartialPageContext.java#0 $) $Date: 10-nov-2005.19:02:58 $
Author:
The Oracle ADF Faces Team

Constructor Summary
PartialPageContextImpl(org.apache.myfaces.trinidad.context.RequestContext afContext)
          Creates a PartialPageContext to use to render the partial targets with the specified ids.
 
Method Summary
 void addPartialTarget(java.lang.String id)
          Adds a new partial target to render.
 void addRenderedPartialTarget(java.lang.String id)
          Adds a partial target that has already been rendered; this is needed if the "clientId" of a component does not match up to the top element (or elements).
 java.util.Iterator<java.lang.String> getPartialTargets()
          Returns the set of partial targets for this rendering pass.
 java.util.Iterator<java.lang.String> getRenderedPartialTargets()
           
 boolean isInsidePartialTarget()
          Returns true if we are inside of a partial target.
 boolean isPartialTarget(java.lang.String id)
          Tests whether the specified id is the client id of a UIComponent that should be rendered as part of the partial rendering pass.
 boolean isPartialTargetRendered(java.lang.String id)
          Tests whether the specified partial target has been rendered.
 void popRenderedPartialTarget()
          Notifies the PartialPageContext that the current partial target has finished rendering.
 void pushRenderedPartialTarget(java.lang.String id)
          Notifies the PartialPageContext that the specified partial target is about to be rendered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartialPageContextImpl

public PartialPageContextImpl(org.apache.myfaces.trinidad.context.RequestContext afContext)
Creates a PartialPageContext to use to render the partial targets with the specified ids.

Method Detail

getPartialTargets

public java.util.Iterator<java.lang.String> getPartialTargets()
Returns the set of partial targets for this rendering pass.

Specified by:
getPartialTargets in class org.apache.myfaces.trinidad.context.PartialPageContext

isPartialTarget

public boolean isPartialTarget(java.lang.String id)
Tests whether the specified id is the client id of a UIComponent that should be rendered as part of the partial rendering pass.

Specified by:
isPartialTarget in class org.apache.myfaces.trinidad.context.PartialPageContext

isPartialTargetRendered

public boolean isPartialTargetRendered(java.lang.String id)
Tests whether the specified partial target has been rendered.

Specified by:
isPartialTargetRendered in class org.apache.myfaces.trinidad.context.PartialPageContext

addPartialTarget

public void addPartialTarget(java.lang.String id)
Adds a new partial target to render.

This method may be called during the partial rendering pass to add to the set of partial targets, but only if the pass has not yet been completed. Clients should first check to see whether the partial rendering pass has finished by calling isPartialPassComplete() before calling this method.

Specified by:
addPartialTarget in class org.apache.myfaces.trinidad.context.PartialPageContext
Parameters:
id - The id of the partial target to render
See Also:
#isPartialPassComplete

isInsidePartialTarget

public boolean isInsidePartialTarget()
Returns true if we are inside of a partial target.

Specified by:
isInsidePartialTarget in class org.apache.myfaces.trinidad.context.PartialPageContext

addRenderedPartialTarget

public void addRenderedPartialTarget(java.lang.String id)
Adds a partial target that has already been rendered; this is needed if the "clientId" of a component does not match up to the top element (or elements).

Specified by:
addRenderedPartialTarget in class org.apache.myfaces.trinidad.context.PartialPageContext

getRenderedPartialTargets

public java.util.Iterator<java.lang.String> getRenderedPartialTargets()
Specified by:
getRenderedPartialTargets in class org.apache.myfaces.trinidad.context.PartialPageContext

pushRenderedPartialTarget

public void pushRenderedPartialTarget(java.lang.String id)
Notifies the PartialPageContext that the specified partial target is about to be rendered.

This method is called automatically by Trinidad during the partial rendering pass when a partial target is about to be rendered. Clients should never need to call this method.

Parameters:
context - the current FacesContext
id - The ID of the partial target that is about to be rendered
See Also:
popRenderedPartialTarget()

popRenderedPartialTarget

public void popRenderedPartialTarget()
Notifies the PartialPageContext that the current partial target has finished rendering.

This method is called automatically by Trinidad during the partial rendering pass when a partial target has finished rendering. Clients should never need to call this method.

Parameters:
context - the current FacesContext


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.