Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.ui.partial
Class PartialPageUtils

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

public class PartialPageUtils
extends java.lang.Object

Utility methods for partial page rendering.


Method Summary
static void forceRedirectURL(RenderingContext context, java.lang.String url)
          Forces the client to redirect to the given URL rather than updating the current targets.
static PartialPageContext getPartialPageContext(RenderingContext context)
          Retrieves the PartialPageContext from a RenderingContext
static void renderFullPage(RenderingContext context, UINode rootNode, PartialPageContext partialContext)
          Renders the full UINode tree rooted at rootNode.
static void renderPartialPage(RenderingContext context, UINode rootNode, PartialPageContext partialContext)
          Performs a partial page render.
static void setPartialPageContext(RenderingContext renderingContext, PartialPageContext partialPageContext)
          Sets a PartialPageContext on a RenderingContext.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPartialPageContext

public static PartialPageContext getPartialPageContext(RenderingContext context)
Retrieves the PartialPageContext from a RenderingContext

setPartialPageContext

public static void setPartialPageContext(RenderingContext renderingContext,
                                         PartialPageContext partialPageContext)
Sets a PartialPageContext on a RenderingContext.

renderPartialPage

public static void renderPartialPage(RenderingContext context,
                                     UINode rootNode,
                                     PartialPageContext partialContext)
                              throws java.io.IOException
Performs a partial page render.

This method performs a partial page render on the subtree rooted at rootNode. Although various portions of the subtree may be rendered, only the contents rendered by the partial target nodes will be sent back to the browser.

The subtree rooted at the rootNode must contain UINode of type UIConstants.BODY_NAME (ie. BodyBean or <body> element) as a parent of the target UINodes in order for the partial page replacement to occur.

If no PartialPageContext is specified, the full UINode tree will be rendered. Note that if the full UINode tree needs to be rendered in response to a partial page request, renderFullPage() must be called.

Parameters:
context - The RenderingContext to use for the partial page render
rootNode - The root of the UINode tree which contains the partial target nodes to render.
partialContext - The PartialPageContext which specifies the partial targets to render. Clients should use PartialPageEventUtils.createPartialContext() to create a PartialPageContext.
See Also:
renderFullPage(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.UINode, oracle.cabo.ui.partial.PartialPageContext), PartialPageEventUtils

renderFullPage

public static void renderFullPage(RenderingContext context,
                                  UINode rootNode,
                                  PartialPageContext partialContext)
                           throws java.io.IOException
Renders the full UINode tree rooted at rootNode.

This method should be called to render a UINode tree when a new full page must be rendered in response to a partial page request. It is not sufficient to directly call UINode.render() in this case, since the rendered content is sent back to the partial page iframe. Calling renderFullPage() instead of UINode.render() causes the rendered to contents to be copied from the hidden iframe into the parent window for display.

Parameters:
context - The RenderingContext to use for the full page render
rootNode - The root of the UINode tree to render
partialContext - The PartialPageContext that was created from the request. Although renderFullPage() renders the entire page and not just targets specified on the PartialPageContext, the PartialPageContext may be needed to provide other information about the request. Clients should use PartialPageEventUtils.createPartialContext() to create the PartialPageContext.

forceRedirectURL

public static void forceRedirectURL(RenderingContext context,
                                    java.lang.String url)
                             throws java.io.IOException
Forces the client to redirect to the given URL rather than updating the current targets.
Parameters:
context - The current RenderingContext.
url - The URL of the error page. The provided URL is placed directly on the page. If encoding in needed, it must already be encoded.

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

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