|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UIXRenderingContext
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. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a clone of the RenderingContext. |
TrinidadAgent |
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(java.lang.String namespaceURI,
java.lang.String name)
Returns the DataObject for the given namespace and name pair. |
DataObject |
getDataObject(UIXRenderingContext outerContext,
java.lang.String namespaceURI,
java.lang.String name)
Internal version of getDataObject(). |
javax.faces.context.FacesContext |
getFacesContext()
|
FormEncoder |
getFormEncoder()
|
org.apache.myfaces.trinidad.skin.Icon |
getIcon(java.lang.String iconName)
|
ImageContext |
getImageContext()
Get an interface that can be used for image lookups and rendering. |
org.apache.myfaces.trinidad.context.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. |
UIXRenderingContext |
getParentContext()
Returns the RenderingContext that this context should delegate calls to pushRenderedChild , popRenderedChild ,
and addDataProvider to. |
org.apache.myfaces.trinidad.context.PartialPageContext |
getPartialPageContext()
|
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. |
javax.faces.context.ResponseWriter |
getResponseWriter()
Returns the ResponseWriter that should be used for rendering text. |
org.apache.myfaces.trinidad.skin.Skin |
getSkin()
Returns the Skin to use for this render. |
java.util.Map<java.lang.String,java.lang.String> |
getSkinResourceKeyMap()
Get the translatedValue Map. |
java.lang.Object |
getStyleClass(java.lang.String key)
|
StyleContext |
getStyleContext()
Get an interface that can be used for style lookups and generation. |
java.lang.String |
getTranslatedString(java.lang.String key)
Returns a translated string from the skin. |
java.lang.Object |
getTranslatedValue(java.lang.String key)
Returns a translated value from the skin. |
URLEncoder |
getURLEncoder()
|
UIVariableResolver |
getVariableResolver()
gets the VariableResolver to use for this render cycle |
void |
popChild()
Removes a logical 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 logical UINode to render to the logical stack. |
void |
pushRenderedChild(UIXRenderingContext currentContext,
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. |
void |
setResponseWriter(javax.faces.context.ResponseWriter writer)
Sets the ResponseWriter that should be used for rendering text. |
void |
setSkinResourceKeyMap(java.util.Map<java.lang.String,java.lang.String> mapping)
Store a Map that maps a skin's resource keys from one key to another. |
Field Detail |
---|
static final java.lang.Object CONTEXT_PATH_PROPERTY
static final java.lang.Object CONTEXT_URI_PROPERTY
Method Detail |
---|
javax.faces.context.FacesContext getFacesContext()
LookAndFeel getLookAndFeel()
org.apache.myfaces.trinidad.skin.Skin getSkin()
RendererManager getRendererManager()
javax.faces.context.ResponseWriter getResponseWriter()
void setResponseWriter(javax.faces.context.ResponseWriter writer)
void setSkinResourceKeyMap(java.util.Map<java.lang.String,java.lang.String> mapping)
mapping
- java.util.Map<java.lang.String,java.lang.String> getSkinResourceKeyMap()
mapping
- java.lang.Object getTranslatedValue(java.lang.String key)
java.lang.String getTranslatedString(java.lang.String key)
org.apache.myfaces.trinidad.skin.Icon getIcon(java.lang.String iconName)
java.lang.Object getStyleClass(java.lang.String key)
TrinidadAgent getAgent()
org.apache.myfaces.trinidad.context.LocaleContext getLocaleContext()
int getAncestorNodeCount()
getAncestorNode(int)
,
getRenderedAncestorNodeCount()
,
getPath()
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()
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()
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)
Path getPath()
getAncestorNodeCount()
,
getAncestorNode(int)
void pushChild(UINode child, java.lang.String childName, int childIndex)
popChild()
,
getAncestorNode(int)
,
getAncestorNodeCount()
,
getPath()
void popChild()
pushChild(org.apache.myfaces.trinidadinternal.ui.UINode, java.lang.String, int)
,
getAncestorNode(int)
,
getAncestorNodeCount()
,
getPath()
void pushRenderedChild(UIXRenderingContext currentContext, 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.
currentContext
- The RenderingContext that is used when rendering
the specified child node.renderedChild
- The UINode that is being rendered.popRenderedChild(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext)
,
getRenderedAncestorNode(int)
,
getRenderedAncestorNodeCount()
void popRenderedChild(UIXRenderingContext currentContext)
Clients shuld never need to call this method as calls to this method are typically made on their behalf by the composite UINode framework.
currentContext
- The current RenderingContext. That is, the
context that was used to render the UINode
that is being popped from the rendered child
stack.pushRenderedChild(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext, org.apache.myfaces.trinidadinternal.ui.UINode)
,
getRenderedAncestorNode(int)
,
getRenderedAncestorNodeCount()
DataObject getDataObject(java.lang.String namespaceURI, java.lang.String name)
#addDataProvider
DataObject getCurrentDataObject()
DataObject setCurrentDataObject(DataObject newDataObject)
getCurrentDataObject()
UIVariableResolver getVariableResolver()
java.lang.Object getProperty(java.lang.String namespace, java.lang.Object key)
void setProperty(java.lang.String namespace, java.lang.Object key, java.lang.Object value)
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)
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)
FormEncoder getFormEncoder()
URLEncoder getURLEncoder()
Configuration getConfiguration()
ImageContext getImageContext()
StyleContext getStyleContext()
UIXRenderingContext 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.
org.apache.myfaces.trinidad.context.PartialPageContext getPartialPageContext()
DataObject getDataObject(UIXRenderingContext outerContext, java.lang.String namespaceURI, java.lang.String name)
java.lang.Object clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |