|
UIX 2.2.8 | ||||||||
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 | +--oracle.cabo.ui.beans.BaseWebBean | +--oracle.cabo.ui.beans.MarlinBean | +--oracle.cabo.ui.beans.nav.TreeBean
This bean is not supported on the following agent types: pda, phone, voice.
The TreeBean is used to display objects in a hierarchical format. It factors data into child/leaf nodes and parent nodes which are either expanded or collapsed. The purpose of the tree control is to allow users to quickly browse through complex sets of hierarchical objects and access detailed information for a record by highlighting it in the tree. The visual representation of the hierarchy using the tree is also intended to show the relationship between a set of objects with respect to one another.
The TreeBean is rendered statically on the client. However, not all of the data
needs to be static. We provide a means of combining static data
that is shared among all users along with client state which is
determined at render time. Per render data on a TreeBean can be set
through use of an object which implements the
TreeDataProxy
interface, which can be set as an attribute on the
TreeBean. One useful implementation of the
TreeDataProxy that we provide is
ClientStateTreeProxy
. It will manage the
expand/collapse state of nodes, and optionally the selection on the tree
both on the client and over the server, on a per render basis.
The TreeBean supports three attributes and one named child:
ID
, nodes
, and
proxy
.
A tree's ID
is used to for the purposes
of identifying the tree during events through the server.
The proxy
attribute is optional and provides an alternate method for
obtaining some properties of the individual nodes.
The nodes
attribute should
return a DataObjectList
containing the root
nodes of the tree. This first DataObjectList indicates all of the
"root", or top level nodes. The number of root nodes is determined
by the result of the getLength()
call on
this root DataObjectList, and every DataObject returned from a
call to getItem(int index)
returns one of
the root DataObjects.
Users may specify anodeStamp
named child for
the tree. The nodeStamp is a UINode which is rendered at each node
of the tree using the appropriate node data. If no node stamp is
specified, then a default stamp of an icon and link will be used.
To determine the children of each of these root node
DataObjects, the value of the nodes
attribute is obtained in turn from each of them. This
value is either null
, to indicate
that the node has no children, or another DataObjectList
representing the node's children. Each of these new
DataObjectLists is also queried with the
nodes
attribute, and the process
continues to completion to build the entire tree structure
for a rendering of the tree.
Recall that each DataObject represents a displayed node in the tree. The actual appearance of a given node is determined by its properties, obtained by a series of queries against it through a proxy. The node properties are as follows:
A tree with a databound proxy attribute.
<ctrl:content xmlns:ui="http://xmlns.oracle.com/uix/ui"> <dataScope xmlns="http://xmlns.oracle.com/uix/ui"> <contents> <tree name="tree1" proxy="${TreeProxy.proxy}"> <nodes> <nodes text="Root1" expandable="collapsed"/> <nodes text="Root2" expandable="collapsed"/> <nodes text="Root3" expandable="expanded"> <nodes text="Node3-1"/> <nodes text="Node3-2" expandable="expanded"> <nodes text="Node3-2-1" selected="false" /> <nodes text="Node3-2-2" selected="true" expandable="no"/> <nodes text="Node3-2-3" expandable="no"/> </nodes> <nodes text="Node3-3" expandable="no"/> </nodes> <nodes text="Root4" expandable="collapsed"/> </nodes> </tree> </contents> <provider> <data name="TreeProxy"> <method class="oracle.cabo.doc.demo.DataTrees" method="getTreeProxy"/> </data> </provider> </dataScope> </ctrl:content> <ctrl:handlers xmlns="http://xmlns.oracle.com/uix/controller"> <event name="expand"> <method class="oracle.cabo.doc.demo.DataTrees" method="expandEventHandler"/> </event> </ctrl:handlers>
UIConstants
,
TreeDataProxy
Constructor Summary | |
|
TreeBean()
Construct an instance of the TreeBean. |
protected |
TreeBean(boolean ignored,
java.lang.String localName)
Construct an instance of the TreeBean. |
|
TreeBean(java.lang.String id)
Construct an instance of the TreeBean. |
Method Summary | |
java.lang.String |
getFormName()
Gets The form name to submit to |
static java.lang.String |
getFormName(MutableUINode bean)
Gets The form name to submit to |
DataObjectList |
getNodes()
Gets the hierarchy of tree data. |
static DataObjectList |
getNodes(MutableUINode bean)
Gets the hierarchy of tree data. |
UINode |
getNodeStamp()
UINode to render at each tree node. |
static UINode |
getNodeStamp(MutableUINode bean)
UINode to render at each tree node. |
TreeDataProxy |
getProxy()
Gets a proxy that sits between tree nodes and the expanded state, selection state, and children of that node |
static TreeDataProxy |
getProxy(MutableUINode bean)
Gets a proxy that sits between tree nodes and the expanded state, selection state, and children of that node |
boolean |
isFormSubmitted()
Gets whether or not to use form submission in the expand/collapse links |
static boolean |
isFormSubmitted(MutableUINode bean)
Gets whether or not to use form submission in the expand/collapse links |
boolean |
isUnvalidated()
Gets If this element is used in formSubmitted
mode, then the default behaviour is to not validate all form
inputs, before submitting to the server. |
static boolean |
isUnvalidated(MutableUINode bean)
Gets If this element is used in formSubmitted
mode, then the default behaviour is to not validate all form
inputs, before submitting to the server. |
static void |
setFormName(MutableUINode bean,
java.lang.String formName)
Sets The form name to submit to |
void |
setFormName(java.lang.String formName)
Sets The form name to submit to |
void |
setFormSubmitted(boolean formSubmitted)
Sets whether or not to use form submission in the expand/collapse links |
static void |
setFormSubmitted(MutableUINode bean,
boolean formSubmitted)
Sets whether or not to use form submission in the expand/collapse links |
void |
setNodes(DataObjectList nodes)
Sets the hierarchy of tree data. |
void |
setNodes(DataObjectList nodes)
Deprecated. since 2.0; please use the non-deprecated version of this function. |
void |
setNodes(DataSet nodes)
Deprecated. since 2.0; please use the non-deprecated version of this function. |
static void |
setNodes(MutableUINode bean,
DataObjectList nodes)
Sets the hierarchy of tree data. |
static void |
setNodes(MutableUINode bean,
DataObjectList nodes)
Deprecated. since 2.0; please use the non-deprecated version of this function. |
static void |
setNodeStamp(MutableUINode bean,
UINode nodeStampNode)
UINode to render at each tree node. |
void |
setNodeStamp(UINode nodeStampNode)
UINode to render at each tree node. |
static void |
setProxy(MutableUINode bean,
TreeDataProxy proxy)
Sets a proxy that sits between tree nodes and the expanded state, selection state, and children of that node |
void |
setProxy(TreeDataProxy proxy)
Sets a proxy that sits between tree nodes and the expanded state, selection state, and children of that node |
void |
setUnvalidated(boolean unvalidated)
Sets If this element is used in formSubmitted
mode, then the default behaviour is to not validate all form
inputs, before submitting to the server. |
static void |
setUnvalidated(MutableUINode bean,
boolean unvalidated)
Sets If this element is used in formSubmitted
mode, then the default behaviour is to not validate all form
inputs, before submitting to the server. |
Methods inherited from class oracle.cabo.ui.beans.MarlinBean |
isEqualMarlinName |
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, 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, getIndexedChild, getIndexedChild, getIndexedChildCount, getLocalName, getNamedChild, getNamedChild, getNamespaceURI, getNodeID, getNodeRole, getRawAttributeValue, render, render |
Constructor Detail |
public TreeBean()
public TreeBean(java.lang.String id)
id
- the page-wide unique client ID of this node.protected TreeBean(boolean ignored, java.lang.String localName)
Method Detail |
public final void setNodes(DataSet nodes)
public final UINode getNodeStamp()
public final void setNodeStamp(UINode nodeStampNode)
public final DataObjectList getNodes()
public final void setNodes(DataObjectList nodes)
public final void setNodes(DataObjectList nodes)
public final TreeDataProxy getProxy()
public final void setProxy(TreeDataProxy proxy)
public final boolean isFormSubmitted()
public final void setFormSubmitted(boolean formSubmitted)
public final boolean isUnvalidated()
formSubmitted
mode, then the default behaviour is to not validate all form
inputs, before submitting to the server. This attribute allows
this validation to be enabled.public final void setUnvalidated(boolean unvalidated)
formSubmitted
mode, then the default behaviour is to not validate all form
inputs, before submitting to the server. This attribute allows
this validation to be enabled.public final java.lang.String getFormName()
public final void setFormName(java.lang.String formName)
public static UINode getNodeStamp(MutableUINode bean)
public static void setNodeStamp(MutableUINode bean, UINode nodeStampNode)
public static DataObjectList getNodes(MutableUINode bean)
public static void setNodes(MutableUINode bean, DataObjectList nodes)
public static void setNodes(MutableUINode bean, DataObjectList nodes)
public static TreeDataProxy getProxy(MutableUINode bean)
public static void setProxy(MutableUINode bean, TreeDataProxy proxy)
public static boolean isFormSubmitted(MutableUINode bean)
public static void setFormSubmitted(MutableUINode bean, boolean formSubmitted)
public static boolean isUnvalidated(MutableUINode bean)
formSubmitted
mode, then the default behaviour is to not validate all form
inputs, before submitting to the server. This attribute allows
this validation to be enabled.public static void setUnvalidated(MutableUINode bean, boolean unvalidated)
formSubmitted
mode, then the default behaviour is to not validate all form
inputs, before submitting to the server. This attribute allows
this validation to be enabled.public static java.lang.String getFormName(MutableUINode bean)
public static void setFormName(MutableUINode bean, java.lang.String formName)
|
UIX 2.2.8 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |