Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.ui.partial
Class PartialPageContext

java.lang.Object
  |
  +--oracle.cabo.ui.partial.PartialPageContext

public class PartialPageContext
extends java.lang.Object

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. These objects are automatically created when PartialPageUtils.renderPartialPage() is called to perform a partial page render.

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.


Constructor Summary
PartialPageContext()
          Creates a PartialPageContext with no partial targets.
PartialPageContext(java.lang.String[] partialTargets)
          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 addPartialTargetRenderListener(PartialTargetRenderListener listener)
          Registers an event listener to receive PartialTargetRenderEvents.
 java.lang.String getCurrentPartialTarget()
          Returns the ID of the partial target that is currently being rendered, if any.
static PartialPageContext getFullPageContext(PartialPageContext context)
          Returns a PartialPageContext which can be used to trigger a full page render in response to a partial page request.
 java.util.Enumeration getPartialTargets()
          Returns the set of partial targets for this rendering pass.
 boolean isFullPageRender()
          Tests whether this PartialPageContext is used to indicate that a full page render is being performed.
 boolean isPartialPassComplete()
          Tests whether all of the partial targets have been rendered.
 boolean isPartialTarget(java.lang.String id)
          Tests whether the specified id is the id of a UINode 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(RenderingContext context)
          Notifies the PartialPageContext that the current partial target has finished rendering.
 void pushRenderedPartialTarget(RenderingContext context, java.lang.String id)
          Notifies the PartialPageContext that the specified partial target is about to be rendered.
 void removePartialTarget(java.lang.String id)
          Removes a partial target from the set of target nodes to render.
 void removePartialTargetRenderListener(PartialTargetRenderListener listener)
          Unregisters an event listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartialPageContext

public PartialPageContext()
Creates a PartialPageContext with no partial targets.

PartialPageContext

public PartialPageContext(java.lang.String[] partialTargets)
Creates a PartialPageContext to use to render the partial targets with the specified ids.
Method Detail

getFullPageContext

public static PartialPageContext getFullPageContext(PartialPageContext context)
Returns a PartialPageContext which can be used to trigger a full page render in response to a partial page request.

isFullPageRender

public boolean isFullPageRender()
Tests whether this PartialPageContext is used to indicate that a full page render is being performed.

getPartialTargets

public java.util.Enumeration getPartialTargets()
Returns the set of partial targets for this rendering pass.

The set of partial targets may change during rendering. After the rendering pass has completed, getPartialTargets() can be used to determine the set of partial targets that were rendered for this pass.

Each item in the returned Enumeration is a String id of a partial target. isPartialTargetRendered() can be used to determine whether or not a particular partial target was actually rendered during the pass.


isPartialTarget

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

isPartialTargetRendered

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

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.

Parameters:
id - The id of the partial target to render
See Also:
isPartialPassComplete()

removePartialTarget

public void removePartialTarget(java.lang.String id)
Removes a partial target from the set of target nodes to render.

This method may be called during the partial rendering pass to prevent a partial target from being rendered.

Parameters:
id - The id to remove from the set of partial targets

getCurrentPartialTarget

public java.lang.String getCurrentPartialTarget()
Returns the ID of the partial target that is currently being rendered, if any.

isPartialPassComplete

public boolean isPartialPassComplete()
Tests whether all of the partial targets have been rendered.

pushRenderedPartialTarget

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

This method is called automatically by UIX 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 RenderingContext
id - The ID of the partial target that is about to be rendered
See Also:
popRenderedPartialTarget(oracle.cabo.ui.RenderingContext)

popRenderedPartialTarget

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

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

Parameters:
context - the current RenderingContext

addPartialTargetRenderListener

public void addPartialTargetRenderListener(PartialTargetRenderListener listener)
Registers an event listener to receive PartialTargetRenderEvents.

removePartialTargetRenderListener

public void removePartialTargetRenderListener(PartialTargetRenderListener listener)
Unregisters an event listener.

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.