|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.trinidadinternal.ui.LogicalNodeRenderingContext
public abstract class LogicalNodeRenderingContext
Abstract RenderingContext implementation providing support for managing logical ancestors and DataProviders. Although this class supports both root and child RenderingContexts, it is configured by default to support child-style RenderingContexts.
Field Summary |
---|
Fields inherited from interface org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext |
---|
CONTEXT_PATH_PROPERTY, CONTEXT_URI_PROPERTY |
Constructor Summary | |
---|---|
LogicalNodeRenderingContext()
Creates a AbstractRenderingContext. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a clone of the RenderingContext. |
UINode |
getAncestorNode(int index)
Returns an ancestor of the node currently being processed. |
int |
getAncestorNodeCount()
Returns the number of nodes in the path form the current node to the root of the tree of nodes being rendered. |
DataObject |
getCurrentDataObject()
Returns a DataObject for the current node (such as a row of a table). |
DataObject |
getDataObject(java.lang.String namespaceURI,
java.lang.String name)
Returns the DataObject for the given namespace and name pair. |
DataObject |
getDataObject(UIXRenderingContext context,
java.lang.String namespaceURI,
java.lang.String name)
Internal version of getDataObject(). |
protected int |
getDefaultNodeStackSize()
Returns the default initial number of nodes in the stack of nodes. |
javax.faces.context.FacesContext |
getFacesContext()
|
Path |
getPath()
Returns the path to the current node. |
protected java.lang.String |
getSkinResourceMappedKey(java.lang.String key)
Given a key, look in the skin resource key map for the mapped value. |
void |
popChild()
Removes a UINode from the stack. |
void |
popRenderedChild(UIXRenderingContext currentContext)
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 UINode about to be rendered to the rendering stack. |
void |
pushRenderedChild(UIXRenderingContext currentContext,
UINode child)
Adds the UINode to actually use to render to the rendered UINode stack. |
protected void |
reset()
Reset the state of the RenderingContext for reuse, even in case where RenderingContext did not complete cleanly. =-= bts Most of this cleanup only really needs to be done if we don't handle catching exceptions and popping the stack correctly when rendering |
DataObject |
setCurrentDataObject(DataObject newDataObject)
Sets the new currentDataObject, returning the current currentDataObject. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext |
---|
getAgent, getConfiguration, getFormEncoder, getIcon, getImageContext, getLocaleContext, getLocalProperty, getLookAndFeel, getParentContext, getPartialPageContext, getProperty, getRenderedAncestorNode, getRenderedAncestorNodeCount, getRendererManager, getResponseWriter, getSkin, getSkinResourceKeyMap, getStyleClass, getStyleContext, getTranslatedString, getTranslatedValue, getURLEncoder, getVariableResolver, setLocalProperty, setProperty, setResponseWriter, setSkinResourceKeyMap |
Constructor Detail |
---|
public LogicalNodeRenderingContext()
Method Detail |
---|
public javax.faces.context.FacesContext getFacesContext()
getFacesContext
in interface UIXRenderingContext
public DataObject getCurrentDataObject()
getCurrentDataObject
in interface UIXRenderingContext
public DataObject setCurrentDataObject(DataObject newDataObject)
UIXRenderingContext
setCurrentDataObject
in interface UIXRenderingContext
UIXRenderingContext.getCurrentDataObject()
public int getAncestorNodeCount()
getAncestorNodeCount
in interface UIXRenderingContext
UIXRenderingContext.getAncestorNode(int)
,
UIXRenderingContext.getRenderedAncestorNodeCount()
,
UIXRenderingContext.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.
getAncestorNode
in interface UIXRenderingContext
UIXRenderingContext.getAncestorNodeCount()
,
UIXRenderingContext.getRenderedAncestorNode(int)
,
UIXRenderingContext.getPath()
public Path getPath()
getPath
in interface UIXRenderingContext
UIXRenderingContext.getAncestorNodeCount()
,
UIXRenderingContext.getAncestorNode(int)
public void pushChild(UINode child, java.lang.String childName, int childIndex)
pushChild
in interface UIXRenderingContext
UIXRenderingContext.popChild()
,
UIXRenderingContext.getAncestorNode(int)
,
UIXRenderingContext.getAncestorNodeCount()
,
UIXRenderingContext.getPath()
public void popChild()
popChild
in interface UIXRenderingContext
UIXRenderingContext.pushChild(org.apache.myfaces.trinidadinternal.ui.UINode, java.lang.String, int)
,
UIXRenderingContext.getAncestorNode(int)
,
UIXRenderingContext.getAncestorNodeCount()
,
UIXRenderingContext.getPath()
public void pushRenderedChild(UIXRenderingContext currentContext, UINode child)
UIXRenderingContext
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
in interface UIXRenderingContext
currentContext
- The RenderingContext that is used when rendering
the specified child node.child
- The UINode that is being rendered.UIXRenderingContext.popRenderedChild(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext)
,
UIXRenderingContext.getRenderedAncestorNode(int)
,
UIXRenderingContext.getRenderedAncestorNodeCount()
public void popRenderedChild(UIXRenderingContext currentContext)
UIXRenderingContext
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
in interface UIXRenderingContext
currentContext
- The current RenderingContext. That is, the
context that was used to render the UINode
that is being popped from the rendered child
stack.UIXRenderingContext.pushRenderedChild(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext, org.apache.myfaces.trinidadinternal.ui.UINode)
,
UIXRenderingContext.getRenderedAncestorNode(int)
,
UIXRenderingContext.getRenderedAncestorNodeCount()
public DataObject getDataObject(UIXRenderingContext context, java.lang.String namespaceURI, java.lang.String name)
getDataObject
in interface UIXRenderingContext
public DataObject getDataObject(java.lang.String namespaceURI, java.lang.String name)
getDataObject
in interface UIXRenderingContext
#addDataProvider
protected int getDefaultNodeStackSize()
protected java.lang.String getSkinResourceMappedKey(java.lang.String key)
key
-
protected void reset()
public java.lang.Object clone()
UIXRenderingContext
clone
in interface UIXRenderingContext
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |