|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.trinidadinternal.ui.BaseUINode
org.apache.myfaces.trinidadinternal.ui.BaseMutableUINode
public class BaseMutableUINode
Root implementation for storing a mutable node of a UIX Components UI tree. This class, as a superclass of BaseWebBean, is an ancestor of all the UIX Componein) WebBeans.
In addition to simply implementing the methods of MutableUINode, BaseMutableUINode, also specifies how the named and indexed children and attributes are stored, and allows the collections implementing this storage to be set and retrieved.
Field Summary |
---|
Constructor Summary | |
---|---|
BaseMutableUINode(java.lang.String namespaceURI,
java.lang.String localName)
Creates a BaseMutableUINode, binding it to a namespace and local name. |
|
BaseMutableUINode(java.lang.String namespaceURI,
java.lang.String localName,
int initialCapacity)
Creates a BaseMutableUINode, binding it to a namespace and local name. |
Method Summary | |
---|---|
void |
addIndexedChild(int childIndex,
UINode child)
Adds an indexed child to the node. |
void |
addIndexedChild(java.lang.String text)
Adds a text child to the bean. |
void |
addIndexedChild(UINode child)
Convenience method for appending an indexed child. |
void |
addIndexedChildren(java.util.Iterator<UINode> indexedChildren)
Convenience method for appending an enumeration of indexed children. |
void |
addIndexedChildren(UINode[] indexedChildren)
Convenience method for appending an array of indexed children. |
void |
clearIndexedChildren()
Removes all of the indexed children. |
protected AttributeMap |
createAttributeMap()
Creates the AttributeMap that will be used for attributes of this node. |
protected UINodeList |
createIndexedNodeList()
Creates the UINodeList that will be used for indexed children of this node. |
protected ContextMap |
createNamedChildMap()
Creates the ContextMap that will be used for named children of this node. |
AttributeMap |
getAttributeMap()
Returns the AttributeMap used to store attributes. |
protected AttributeMap |
getAttributeMap(boolean createIfNull)
Returns the AttributeMap used to store attributes. |
java.lang.Object |
getAttributeValue(AttributeKey attrKey)
Returns the attribute value of the node; unlike the version of this method that takes a RenderingContext, this method must return the actual object originally set on the node - BoundValues will be directly returned. |
UINodeList |
getIndexedNodeList()
Returns the UINodeList used to retrieve indexed children from the node. |
protected UINodeList |
getIndexedNodeList(boolean createIfNull)
Returns the UINodeList used to retrieve indexed children from the node. |
ContextMap |
getNamedChildMap()
Returns the ContextMap used to store named children. |
protected ContextMap |
getNamedChildMap(boolean forMutating)
Returns the ContextMap used to store named children. |
boolean |
isRendered()
Sets whether the bean is rendered. |
UINode |
removeIndexedChild(int childIndex)
Removes an indexed child from the node. |
void |
replaceIndexedChild(int childIndex,
UINode child)
Replaces a single child. |
void |
setAttributeMap(AttributeMap newAttrMap)
Replaces the AttributeMap used to store the attributes. |
void |
setAttributeValue(AttributeKey attrKey,
java.lang.Object value)
Sets an attribute value of the node. |
void |
setID(java.lang.String newID)
Sets the page-wide unique client ID of this node. |
void |
setIndexedNodeList(UINodeList nodeList)
Replaces the UINodeList used to store the list of indexed children for this UINode. |
void |
setNamedChild(java.lang.String childName,
UINode namedChild)
Sets a named child on the node. |
void |
setNamedChildMap(ContextMap childMap)
Replaces the ContextMap used to store the named children for this UINode. |
void |
setRendered(boolean rendered)
Sets whether the bean is rendered. |
Methods inherited from class org.apache.myfaces.trinidadinternal.ui.BaseUINode |
---|
getAttributeNames, getAttributeValue, getAttributeValueImpl, getChildArray, getChildNames, getIndexedChild, getIndexedChildCount, getLocalName, getNamedChild, getNamespaceURI, getNodeRole, getRawAttributeValue, getRenderedUINode, getRenderer, getRenderer, getUIComponent, render, render, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.myfaces.trinidadinternal.ui.UINode |
---|
getAttributeNames, getAttributeValue, getChildNames, getIndexedChild, getIndexedChildCount, getLocalName, getNamedChild, getNamespaceURI, getNodeRole, getRawAttributeValue, getUIComponent, render, render |
Constructor Detail |
---|
public BaseMutableUINode(java.lang.String namespaceURI, java.lang.String localName)
public BaseMutableUINode(java.lang.String namespaceURI, java.lang.String localName, int initialCapacity)
Method Detail |
---|
public void setID(java.lang.String newID)
This property is typically only needed when writing client-side JavaScript.
setID
in interface MutableUINode
public void setRendered(boolean rendered)
public boolean isRendered()
public void addIndexedChild(int childIndex, UINode child)
addIndexedChild
in interface MutableUINode
childIndex
- the zero-based index to add the child atchild
- the new child nodeMutableUINode.removeIndexedChild(int)
,
MutableUINode.clearIndexedChildren()
,
List.add(E)
public void addIndexedChild(UINode child)
addIndexedChild
in interface MutableUINode
child
- the new child node
MutableUINode.removeIndexedChild(int)
,
MutableUINode.clearIndexedChildren()
,
List.add(E)
public final void addIndexedChildren(UINode[] indexedChildren)
public final void addIndexedChildren(java.util.Iterator<UINode> indexedChildren)
public void addIndexedChild(java.lang.String text)
text
- the text - does not need to be escapedpublic UINode removeIndexedChild(int childIndex)
removeIndexedChild
in interface MutableUINode
childIndex
- the zero-based index of the childMutableUINode.clearIndexedChildren()
,
List.remove(java.lang.Object)
public void clearIndexedChildren()
clearIndexedChildren
in interface MutableUINode
MutableUINode.removeIndexedChild(int)
,
Collection.clear()
public void replaceIndexedChild(int childIndex, UINode child)
Although this method could be implemented in terms of
addIndexedChild
and removeIndexedChild
,
it is present on this interface in
order to allow for more efficient implementations.
replaceIndexedChild
in interface MutableUINode
childIndex
- the zero-based index to add the child at.child
- the new child node
removeIndexedChild(int)
public void setNamedChild(java.lang.String childName, UINode namedChild)
setNamedChild
in interface MutableUINode
childName
- the name of the childnamedChild
- the child; passing null will remove any existing
UINode with that name.public final java.lang.Object getAttributeValue(AttributeKey attrKey)
name
- the name of the attributepublic void setAttributeValue(AttributeKey attrKey, java.lang.Object value)
setAttributeValue
in interface MutableUINode
name
- the name of the attributevalue
- the new value; passing null will remove any
existing attribute with that name.public void setAttributeMap(AttributeMap newAttrMap)
public void setIndexedNodeList(UINodeList nodeList)
setAttributeMap(org.apache.myfaces.trinidadinternal.ui.collection.AttributeMap)
,
setNamedChildMap(org.apache.myfaces.trinidadinternal.ui.collection.ContextMap)
public void setNamedChildMap(ContextMap childMap)
public final ContextMap getNamedChildMap()
protected final ContextMap getNamedChildMap(boolean forMutating)
getNamedChildMap
in class BaseUINode
createIfNull
- if true, creates
a ContextMap object if one has not yet been created.public final AttributeMap getAttributeMap()
protected final AttributeMap getAttributeMap(boolean createIfNull)
getAttributeMap
in class BaseUINode
createIfNull
- if true, creates
an AttributeMap object if one has not yet been created.public final UINodeList getIndexedNodeList()
getIndexedChild()
,
getIndexedChildCount()
, and
replaceIndexedChild()
will use the result of this
method - if not implemented, subclasses must override both
of those methods.
BaseUINode.getIndexedChild(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext, int)
,
replaceIndexedChild(int, org.apache.myfaces.trinidadinternal.ui.UINode)
,
BaseUINode.getIndexedChildCount(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext)
protected final UINodeList getIndexedNodeList(boolean createIfNull)
getIndexedChild()
,
getIndexedChildCount()
, and
replaceIndexedChild()
will use the result of this
method - if not implemented, subclasses must override all
of those methods.
getIndexedNodeList
in class BaseUINode
BaseUINode.getIndexedChild(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext, int)
,
replaceIndexedChild(int, org.apache.myfaces.trinidadinternal.ui.UINode)
,
BaseUINode.getIndexedChildCount(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext)
protected UINodeList createIndexedNodeList()
protected ContextMap createNamedChildMap()
protected AttributeMap createAttributeMap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |