|
UIX 2.2.16 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.cabo.ui.DeprecatedUINode | +--oracle.cabo.ui.BaseUINode | +--oracle.cabo.ui.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.
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,
java.lang.String id)
Creates a BaseMutableUINode, binding it to a namespace and local name, and setting the ID. |
|
BaseMutableUINode(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String id,
int initialCapacity)
Creates a BaseMutableUINode, binding it to a namespace and local name, and setting the ID. |
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.Enumeration 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. |
java.lang.Object |
getAttributeValue(java.lang.String attrKey)
Deprecated. The version of this function taking an AttributeKey rather than a String is more efficient, and thus preferred. Callers should be defining their AttributeKeys as constants and reusing them, rather than calling this method, and forcing the correct AttributeKey to be looked up each time. |
int |
getIndexedChildCount()
Deprecated. The version of this function also taking a RenderingContext is preferred, as this version will return incorrect results if the specified named child is determined by the RenderingContext. |
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 |
setAttributeDictionary(java.util.Dictionary newAttrDictionary)
Deprecated. This function is only present for backwards compatibility. For most uses, AttributeMap implementations other than DictionaryAttributeMap are more efficient. |
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 |
setAttributeValue(java.lang.String attrKey,
BoundValue value)
Deprecated. The version of this function taking an AttributeKey rather than a String is more efficient, and thus preferred. Callers should be defining their AttributeKeys as constants and reusing them, rather than calling this method, and forcing the correct AttributeKey to be looked up each time. |
void |
setAttributeValue(java.lang.String attrKey,
java.lang.Object value)
Deprecated. The version of this function taking an AttributeKey rather than a String is more efficient, and thus preferred. Callers should be defining their AttributeKeys as constants and reusing them, rather than calling this method, and forcing the correct AttributeKey to be looked up each time. |
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 |
setNodeID(java.lang.String nodeID)
Sets the ID indentifying this UINode instance. |
void |
setRendered(boolean rendered)
Sets whether the bean is rendered. |
Methods inherited from class oracle.cabo.ui.BaseUINode |
getAttributeNames, getAttributeValue, getAttributeValueImpl, getChildArray, getChildNames, getIndexedChild, getIndexedChild, getIndexedChildCount, getLocalName, getNamedChild, getNamespaceURI, getNodeID, getNodeRole, getPreorderDescendentAttributeValue, getRawAttributeValue, getRenderedUINode, getRenderer, getRenderer, render, render, toString |
Methods inherited from class oracle.cabo.ui.DeprecatedUINode |
getAttributeValue, getChildNames, getID, getNamedChild |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface oracle.cabo.ui.UINode |
getAttributeNames, getAttributeValue, getAttributeValue, getChildNames, getChildNames, getID, getIndexedChild, getIndexedChild, getIndexedChildCount, getLocalName, getNamedChild, getNamedChild, getNamespaceURI, getNodeID, getNodeRole, getRawAttributeValue, render, render |
Constructor Detail |
public BaseMutableUINode(java.lang.String namespaceURI, java.lang.String localName)
public BaseMutableUINode(java.lang.String namespaceURI, java.lang.String localName, java.lang.String id)
public BaseMutableUINode(java.lang.String namespaceURI, java.lang.String localName, java.lang.String id, 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 java.lang.Object getAttributeValue(java.lang.String attrKey)
null
will be returned.
getAttributeValue
in interface MutableUINode
public final void setAttributeValue(java.lang.String attrKey, java.lang.Object value)
setAttributeValue
in interface MutableUINode
attrKey
- the name of the attributevalue
- the new value; passing null will remove any
existing attribute with that name.public final void setAttributeValue(java.lang.String attrKey, BoundValue value)
setAttributeValue
in interface MutableUINode
attrKey
- the name of the attributevalue
- the new value; passing null will remove any
existing attribute with that name.public final void setAttributeDictionary(java.util.Dictionary newAttrDictionary)
public void addIndexedChild(int childIndex, UINode child)
addIndexedChild
in interface MutableUINode
childIndex
- the zero-based index to add the child atchild
- the new child nodepublic void addIndexedChild(UINode child)
addIndexedChild
in interface MutableUINode
oracle.cabo.ui.MutableUINode
child
- the new child node
MutableUINode.removeIndexedChild(int)
,
MutableUINode.clearIndexedChildren()
,
List.add(java.lang.Object)
public final void addIndexedChildren(UINode[] indexedChildren)
public final void addIndexedChildren(java.util.Enumeration 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 childpublic void clearIndexedChildren()
clearIndexedChildren
in interface MutableUINode
oracle.cabo.ui.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 setNodeID(java.lang.String nodeID)
Node IDs should be static over the lifetime of a webbean, so clients should avoid setting the node ID more than once.
This method is especiall useful for clients creating webbeans with <jsp:usebean> as that creation approach can only use zero-argument constructors.
setNodeID
in interface MutableUINode
setNodeID
in class BaseUINode
public void setAttributeMap(AttributeMap newAttrMap)
public void setIndexedNodeList(UINodeList nodeList)
setAttributeMap(oracle.cabo.ui.collection.AttributeMap)
,
setNamedChildMap(oracle.cabo.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(oracle.cabo.ui.RenderingContext, int)
,
replaceIndexedChild(int, oracle.cabo.ui.UINode)
,
getIndexedChildCount()
public int getIndexedChildCount()
getIndexedChildCount
in interface UINode
getIndexedChildCount
in class BaseUINode
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(oracle.cabo.ui.RenderingContext, int)
,
replaceIndexedChild(int, oracle.cabo.ui.UINode)
,
getIndexedChildCount()
protected UINodeList createIndexedNodeList()
protected ContextMap createNamedChildMap()
protected AttributeMap createAttributeMap()
|
UIX 2.2.16 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |