|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UINode
Interface for storing a node of a UIX Components UI tree.
Children of this UINode are stored in two separate fashions--by name or by index. How a child node is stored is dependent upon the contract between a UINode and its Renderer. For example, a Renderer that renders an arbitrary separator between each of its children may use a named child to indicate the UINode to use to render the separator, while the indexed children are used to indicate the children to render.
Note that other UINodes referenced by a UINode should be stored as either named children or indexed children. They should not be stored as attributes or private state.
UINodes do not store references to their parent UINodes. This allows the same instance of a UINode subtree to appear in multiple locations in the UINode tree.
Method Summary | |
---|---|
java.util.Iterator<AttributeKey> |
getAttributeNames(UIXRenderingContext context)
Returns an Iterator of the names that attribute values have been added under. |
java.lang.Object |
getAttributeValue(UIXRenderingContext context,
AttributeKey attrKey)
Returns the value of the attribute with the specified name in the RenderingContext. |
java.util.Iterator<java.lang.String> |
getChildNames(UIXRenderingContext context)
Returns an Iterator of the names that named children have been added under. |
UINode |
getIndexedChild(UIXRenderingContext context,
int childIndex)
Returns the indexed child at the specified index. |
int |
getIndexedChildCount(UIXRenderingContext context)
Returns the number of indexed children in this UINode. |
java.lang.String |
getLocalName()
Name used to distinguish the name of a UINode within a namespace. |
UINode |
getNamedChild(UIXRenderingContext context,
java.lang.String childName)
Returns the child identified by childName. |
java.lang.String |
getNamespaceURI()
The name space URI that segregates the local name of this UINode so that nodes with the same local name will not clash. |
NodeRole |
getNodeRole(UIXRenderingContext context)
Returns the role that this node occupies. |
java.lang.Object |
getRawAttributeValue(UIXRenderingContext context,
AttributeKey attrKey)
Returns the value of the attribute with a specified name, without attempting to further resolve that value - as if , for instance, it might be a BoundValue. |
javax.faces.component.UIComponent |
getUIComponent()
Returns the UIComponent that this node represents, or null if it is not attached to a UIComponent. |
void |
render(UIXRenderingContext context)
Renders this UINode. |
void |
render(UIXRenderingContext context,
UINode node)
|
Method Detail |
---|
javax.faces.component.UIComponent getUIComponent()
java.lang.String getNamespaceURI()
Any namespace String returned by this method should be interned for maximum performance. This allows namespace comparisons to be performed using object identity, versus the slower object equality. If the String returned is a String constant, the Java VM will have done this for you automatically.
As with all namespace URI's, this name is only used as an identifier. No other sematics are implied.
The RendererManager
allows RendererFactory
s to
be registered by namespace.
TO DO: put in link to XML namespaces
getLocalName()
,
RendererManager
,
RendererFactory
java.lang.String getLocalName()
Together with the UINode's namespace URI, the local name is typically used to determine which Renderer to use to render the UINode.
int getIndexedChildCount(UIXRenderingContext context)
If the UINode is mutable and may be modified and read in different threads, it is the programmer's responsibility to ensure proper synchronization.
getIndexedChild(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext, int)
UINode getIndexedChild(UIXRenderingContext context, int childIndex)
If the UINode is mutable and may be modified and read in different threads, it is the programmer's responsibility to ensure proper synchronization.
getIndexedChildCount(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext)
UINode getNamedChild(UIXRenderingContext context, java.lang.String childName)
Constants for named children used by UIX Components UINodes may be found in
the UIConstants interface. The constants for the named children follow
the pattern <xxx>_CHILD
.
If the UINode is mutable and may be modified and read in different threads, it is the programmer's responsibility to ensure proper synchronization.
getChildNames(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext)
,
UIConstants
java.util.Iterator<java.lang.String> getChildNames(UIXRenderingContext context)
getNamedChild
.
If the UINode is mutable and may be modified and read in different threads, it is the programmer's responsibility to ensure proper synchronization.
getNamedChild(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext, java.lang.String)
java.util.Iterator<AttributeKey> getAttributeNames(UIXRenderingContext context)
getAttributeValue
.
If the UINode is mutable and may be modified and read in different threads, it is the programmer's responsibility to ensure proper synchronization.
getAttributeValue(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext, org.apache.myfaces.trinidadinternal.ui.AttributeKey)
java.lang.Object getAttributeValue(UIXRenderingContext context, AttributeKey attrKey)
null
will be returned.
Note that as with indexed children and named children, the presence of of an attribute is no guarantee that the Renderer used to render this UINode will actually use the attribute. The presence of attributes should only be considered as hints to the Renderer.
If the UINode is mutable and may be modified and read in different threads, it is the programmer's responsibility to ensure proper synchronization.
getAttributeNames(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext)
java.lang.Object getRawAttributeValue(UIXRenderingContext context, AttributeKey attrKey)
BoundValue
NodeRole getNodeRole(UIXRenderingContext context)
void render(UIXRenderingContext context) throws java.io.IOException
java.io.IOException
void render(UIXRenderingContext context, UINode node) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |