Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.ui
Interface MutableUINode

All Superinterfaces:
UINode
All Known Subinterfaces:
MessageBean
All Known Implementing Classes:
BaseMutableUINode, MutableUINodeAdapter

public interface MutableUINode
extends UINode

MutableUINode extends UINode to add mutability. Most WebBeans will inherit from this class, but Renderers only see that immutable UINode interface.

The indexed children manipulation methods--addIndexedChild, removeIndexedChild, and clearIndexedChildren. follow the same semantics as the indexed methods from the Java Collections List and Collection classes respectively.


Method Summary
 void addIndexedChild(int childIndex, UINode child)
          Inserts an indexed child to the node.
 void addIndexedChild(UINode child)
          Inserts an indexed child to the node, placing after all other nodes.
 void clearIndexedChildren()
          Removes all of the indexed children.
 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.
 UINode removeIndexedChild(int childIndex)
          Removes an indexed child from the node.
 void replaceIndexedChild(int childIndex, UINode child)
          Replaces a single child.
 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 id)
          Sets the page-wide unique client ID of this node.
 void setNamedChild(java.lang.String childName, UINode namedChild)
          Sets a named child on the node.
 void setNodeID(java.lang.String nodeID)
          Sets the ID indentifying this UINode instance.
 
Methods inherited from interface oracle.cabo.ui.UINode
getAttributeNames, getAttributeValue, getAttributeValue, getChildNames, getChildNames, getID, getIndexedChild, getIndexedChild, getIndexedChildCount, getIndexedChildCount, getLocalName, getNamedChild, getNamedChild, getNamespaceURI, getNodeID, getNodeRole, getRawAttributeValue, render, render
 

Method Detail

addIndexedChild

public void addIndexedChild(int childIndex,
                            UINode child)
Inserts an indexed child to the node. Shifts the element currently at that position, if any, and any subsequent elements to the right (adds one to their indices). Children may be added to the end of the list of indexed children with the second version of addIndexedChild().

Unlike many other APIs, adding a child does not remove it from any other parent nodes. In fact, the same child UINode instance is allowed to appear in multiple different indices of the same parent UINode.

Parameters:
childIndex - the zero-based index to add the child at.
child - the new child node

See Also:
removeIndexedChild(int), clearIndexedChildren(), List.add(java.lang.Object)

addIndexedChild

public void addIndexedChild(UINode child)
Inserts an indexed child to the node, placing after all other nodes.

Unlike many other APIs, adding a child does not remove it from any other parent nodes. In fact, the same child UINode instance is allowed to appear in multiple different indices of the same parent UINode.

Parameters:
child - the new child node

See Also:
removeIndexedChild(int), clearIndexedChildren(), List.add(java.lang.Object)

removeIndexedChild

public UINode removeIndexedChild(int childIndex)
Removes an indexed child from the node.
Parameters:
childIndex - the zero-based index of the child to remove

See Also:
clearIndexedChildren(), List.remove(java.lang.Object)

clearIndexedChildren

public void clearIndexedChildren()
Removes all of the indexed children.

Although this method could be implemented in terms of removeIndexedChild, it is present on this interface in order to allow for more efficient implementations.

See Also:
removeIndexedChild(int), Collection.clear()

replaceIndexedChild

public void replaceIndexedChild(int childIndex,
                                UINode child)
Replaces a single 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.

Parameters:
childIndex - the zero-based index to add the child at.
child - the new child node

See Also:
removeIndexedChild(int)

setNamedChild

public void setNamedChild(java.lang.String childName,
                          UINode namedChild)
Sets a named child on the node. Any node attached with that name will be removed.

Parameters:
childName - the name of the child
namedChild - the child; passing null will remove any existing UINode with that name.

setAttributeValue

public void setAttributeValue(AttributeKey attrKey,
                              java.lang.Object value)
Sets an attribute value of the node.
Parameters:
name - the name of the attribute
value - the new value; passing null will remove any existing attribute with that name.

setNodeID

public void setNodeID(java.lang.String nodeID)
Sets the ID indentifying this UINode instance. This ID is never output to the user agent.

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.


setAttributeValue

public 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.

Sets an attribute value of the node.
Parameters:
attrKey - the name of the attribute
value - the new value; passing null will remove any existing attribute with that name.

getAttributeValue

public 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.

Returns the value of the attribute with the specified name. If no attribute with the specified name exists in this UINode, or a checked Exception occurs in retrieving the value of the attribute, null will be returned.


setID

public void setID(java.lang.String id)
Sets the page-wide unique client ID of this node. The string set must comply with the XML id specification--namely it must begin with a [a-z][A-z] and after that can contain as many of [a-z][A-Z][0-9][._-:] as desired.

This property is typically only needed when writing client-side JavaScript.

This method is only present on this interface for backwards compatibility and will be removed from this interface in a future version of UIX Components and moved to oracle.cabo.ui.beans.BaseWebBean


setAttributeValue

public 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.

Sets an attribute value of the node.
Parameters:
attrKey - the name of the attribute
value - the new value; passing null will remove any existing attribute with that name. This method is only present on this interface for backwards compatibility and will be removed from this interface in a future version of UIX Components .

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.