|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Context for a single rendering pass over a tree of UINodes. RendererContexts do not last longer than a single rendering, so any state stored on the context will not be persistent.
Field Summary | |
static java.lang.Object |
CONTEXT_PATH_PROPERTY
This property is used to retrieve the file system path corresponding to the root of the current servlet context. |
static java.lang.Object |
CONTEXT_URI_PROPERTY
This property is used to retrieve the URI corresponding to the root of the current servlet context. |
static java.lang.Object |
SHARED_CONTEXT_PATH_PROPERTY
This property is used to retrieve the file system path corresponding to the root of a shared servlet context which contains a copy of the UIX installable resource files that are shared across multiple web applications. |
static java.lang.Object |
SHARED_CONTEXT_URI_PROPERTY
This property is used to retrieve the URI corresponding to the root of the shared deployment of the UIX installable resource files. |
Method Summary | |
void |
addDataProvider(DataProvider provider)
Adds a DataProvider. |
java.lang.Object |
clone()
Returns a clone of the RenderingContext. |
Agent |
getAgent()
Returns an Agent object that can be used to identify what device will display the rendering. |
UINode |
getAncestorNode(int index)
Returns a logical ancestor of the node currently being processed. |
int |
getAncestorNodeCount()
Returns the number of logical nodes in the path form the current node to the root of the tree of nodes being rendered. |
Configuration |
getConfiguration()
Returns a Configuration object that will be used to locate paths and return global properties. |
DataObject |
getCurrentDataObject()
Returns a DataObject for the current node (such as a row of a table). |
DataObject |
getDataObject(RenderingContext outerContext,
java.lang.String namespaceURI,
java.lang.String name)
Internal version of getDataObject(). |
DataObject |
getDataObject(java.lang.String namespaceURI,
java.lang.String name)
Returns the DataObject for the given namespace and name pair. |
ErrorLog |
getErrorLog()
Get an interface that can be used to log errors. |
ImageContext |
getImageContext()
Get an interface that can be used for image lookups and rendering. |
LocaleContext |
getLocaleContext()
Returns the LocaleContext that should be used for rendering. |
java.lang.Object |
getLocalProperty(int ancestorIndex,
java.lang.Object key,
java.lang.Object defaultValue)
Retrieves the specifed property from the stack frame of a rendering UINode. |
LookAndFeel |
getLookAndFeel()
Returns the LookAndFeel to use for this render. |
OutputMethod |
getOutputMethod()
Returns the OutputMethod that should be used for rendering text. |
RenderingContext |
getParentContext()
Returns the RenderingContext that this context should delegate calls to pushRenderedChild , popRenderedChild ,
and addDataProvider to. |
Path |
getPath()
Returns the path to the current logical node. |
java.lang.Object |
getProperty(java.lang.String namespace,
java.lang.Object key)
Gets a property stored on the context. |
UINode |
getRenderedAncestorNode(int index)
Returns an ancestor of the node currently being processed. |
int |
getRenderedAncestorNodeCount()
Returns the number of rendered nodes in the path form the current node being rendered to the root of the tree of nodes being rendered. |
RendererManager |
getRendererManager()
Returns the RendererManager that should be used for finding renderers. |
StyleContext |
getStyleContext()
Get an interface that can be used for style lookups and generation. |
URLEncoder |
getURLEncoder()
|
void |
popChild()
Removes a logical UINode from the stack. |
void |
popRenderedChild()
Removes the UINode to actually use to render from the rendered UINode stack. |
void |
pushChild(UINode child,
java.lang.String childName,
int childIndex)
Adds the logical UINode to render to the logical stack. |
void |
pushRenderedChild(UINode renderedChild)
Adds the UINode to actually use to render to the rendered UINode stack. |
DataObject |
setCurrentDataObject(DataObject newDataObject)
Sets the new currentDataObject, returning the current currentDataObject. |
void |
setLocalProperty(java.lang.Object key,
java.lang.Object value)
Sets a property on the stack frame of the currently rendering UINode using a key. |
void |
setProperty(java.lang.String namespace,
java.lang.Object key,
java.lang.Object value)
Stores a property on the context. |
java.lang.String |
transformName(java.lang.String baseName)
Transforms a UINode Name to a Name suitable for rendering, given the current RenderingContext state. |
Field Detail |
public static final java.lang.Object CONTEXT_PATH_PROPERTY
public static final java.lang.Object CONTEXT_URI_PROPERTY
public static final java.lang.Object SHARED_CONTEXT_PATH_PROPERTY
The UIX installable resource files can be installed in three possible locations:
If a local copy of the UIX installable resource files exists, it is always preferred over other (remote) copies of these files. In this case, the SHARED_CONTEXT_PATH_PROPERTY defaults to null to indicate that no shared installable files are available. If a copy of the UIX installable resource files are found within the same servlet container as the web application, these files are favored over a remote copy of the files (as specified via the oracle.cabo.ui.sharedContextPath system property.)
public static final java.lang.Object SHARED_CONTEXT_URI_PROPERTY
ServletRenderingContext automatically provides this value as follows. If a local copy of the installable files are found in the current web application, SHARED_CONTEXT_URI_PROPERTY defaults to null, and the local installable files are used. Otherwise, if a remote copy of the installable files are found, the SHARED_CONTEXT_URI_PROPERTY is set to the empty string (""). The assumption is that the shared copy of the installable files can be accessed at the URI associated with the Configuration.BASE_DIRECTORY (by default, "/cabo/").
Method Detail |
public LookAndFeel getLookAndFeel()
public RendererManager getRendererManager()
public OutputMethod getOutputMethod() throws java.io.IOException
public Agent getAgent()
public LocaleContext getLocaleContext()
public int getAncestorNodeCount()
getAncestorNode(int)
,
getRenderedAncestorNodeCount()
,
getPath()
public UINode getAncestorNode(int index)
getAncestorNode(0)
will always return the current
node. Returns null if the index is greater than or equal to
the number of ancestors.
getAncestorNodeCount()
,
getRenderedAncestorNode(int)
,
getPath()
public int getRenderedAncestorNodeCount()
Because a single logical node may be transformed into multiple nodes for rendering, the rendered node count will always be equal to or greater than the logical node count.
Typically, Renderer implementations are the only callers to this method.
getAncestorNodeCount()
public UINode getRenderedAncestorNode(int index)
getRenderedAncestorNode(0)
will always return the current
rendering node. Returns null if the index is greater than or equal to
the number of ancestors.
Because a single logical node may be transformed into multiple nodes for rendering, the rendered node count will always be equal to or greater than the logical node count.
Typically, Renderer implementations are the only callers to this method.
getAncestorNode(int)
public Path getPath()
getAncestorNodeCount()
,
getAncestorNode(int)
public void pushChild(UINode child, java.lang.String childName, int childIndex)
popChild()
,
getAncestorNode(int)
,
getAncestorNodeCount()
,
getPath()
public void popChild()
pushChild(oracle.cabo.ui.UINode, java.lang.String, int)
,
getAncestorNode(int)
,
getAncestorNodeCount()
,
getPath()
public void pushRenderedChild(UINode renderedChild)
Clients shuld never need to call this method as calls to this method are typically made on their behalf by the composite UINode framework.
popRenderedChild()
,
getRenderedAncestorNode(int)
,
getRenderedAncestorNodeCount()
public void popRenderedChild()
Clients shuld never need to call this method as calls to this method are typically made on their behalf by the composite UINode framework.
pushRenderedChild(oracle.cabo.ui.UINode)
,
getRenderedAncestorNode(int)
,
getRenderedAncestorNodeCount()
public void addDataProvider(DataProvider provider)
DataProviders added last will receive precedence in serving data.
provider
- the DataProvider to add; if null, the method
is a no-opgetDataObject(java.lang.String, java.lang.String)
public DataObject getDataObject(java.lang.String namespaceURI, java.lang.String name)
addDataProvider(oracle.cabo.ui.data.DataProvider)
public DataObject getCurrentDataObject()
public DataObject setCurrentDataObject(DataObject newDataObject)
getCurrentDataObject()
public java.lang.Object getProperty(java.lang.String namespace, java.lang.Object key)
public void setProperty(java.lang.String namespace, java.lang.Object key, java.lang.Object value)
public void setLocalProperty(java.lang.Object key, java.lang.Object value)
This method is for use by rendering code that needs to save some state while it is rendering.
key
- Key used to identify this property on the stack frame.value
- Value to store. null
is an acceptable value.
getLocalProperty(int, java.lang.Object, java.lang.Object)
public java.lang.Object getLocalProperty(int ancestorIndex, java.lang.Object key, java.lang.Object defaultValue)
defaultValue
is returned.
The keys are compared by identity for performance.
This method is for use by rendering code that needs to save some state while it is rendering.
ancestorIndex
- index into the rendered ancestor stack. If 0,
uses the currently rendering nodekey
- Key used to identify the property on the stack frame to
retrieve.defaultValue
- Value to return if the property doesn't exist
in the stack frame.
setLocalProperty(java.lang.Object, java.lang.Object)
public java.lang.String transformName(java.lang.String baseName)
public URLEncoder getURLEncoder()
public Configuration getConfiguration()
public ErrorLog getErrorLog()
public ImageContext getImageContext()
public StyleContext getStyleContext()
public RenderingContext getParentContext()
pushRenderedChild
, popRenderedChild
,
and addDataProvider
to. The parent context acts to
segregate the logical node structure internal to a composite UINode
from the deceloper's logical UINode structure. By calling
getParentContext.getAncestorNode(0)
the composite UINode
gains access to the UINode that the composite UINode is attempting
to render.
Typically, only composite UINode implementors ever need to call this method.
public DataObject getDataObject(RenderingContext outerContext, java.lang.String namespaceURI, java.lang.String name)
public java.lang.Object clone()
clone
in class java.lang.Object
|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |