|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.faces.component.UIComponent | +--oracle.adf.view.faces.component.UIXComponent | +--oracle.adf.view.faces.component.UIXComponentBase | +--oracle.adf.view.faces.component.CollectionBase | +--oracle.adf.view.faces.component.TreeBase | +--oracle.adf.view.faces.component.UIXTree
ADF Faces tree components are used to display hierarchical data. For example, if we have a personnel organization chart depicting all the direct reports under each employee, we could use a tree component to display this chart. While each element (employee) in the hierarchy may have any number of child elements, each element can only have one parent element.
The ADF tree components use a model to access the data in the
underlying hierarchy. The specific model class is
oracle.adf.view.faces.model.TreeModel
.
You may find the
oracle.adf.view.faces.model.ChildPropertyTreeModel
class
useful when constructing a TreeModel
.
The tree components use a stamping strategy similar to the ADF Table component. Child components are used to display the data for each element in the tree. Each child component is not recreated per element; instead, each child is repeatedly rendered (stamped) once per element. Because of this stamping behavior, only certain types of components are supported as children. Supported components include all components with no behavior and most components that implement the EditableValueHolder or ActionSource interfaces.
Each time a child component is stamped, the data for the current
element is copied into an EL reachable property. The
name of this property is defined by the var
property on
the tree component. Once the tree has completed rendering, this property is
removed (or reverted back to its previous value).
When the user expands or collapses a subtree the tree
generates a DisclosureEvent
. This event has an
isExpanded
method that returns whether the user wants
to expand or collapse the subtree of a particular element. That
particular element is made current on the Tree before the event is
delivered.
The ADF tree components use an instance of the
oracle.adf.view.faces.model.TreeState
class to keep track
of which elements are expanded or collapsed. This instance is stored
as the "treeState" attribute on the component. You may use this
instance to programmatically control the expand/collapse state of an
element in the hierarchy.
Field Summary | |
static java.lang.String |
COMPONENT_FAMILY
|
static java.lang.String |
COMPONENT_TYPE
|
static PropertyKey |
DISCLOSURE_LISTENER_KEY
|
static PropertyKey |
IMMEDIATE_KEY
|
static PropertyKey |
TREE_STATE_KEY
|
static FacesBean.Type |
TYPE
|
static PropertyKey |
VALUE_KEY
|
static PropertyKey |
VAR_KEY
|
Fields inherited from class oracle.adf.view.faces.component.UIXComponentBase |
ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY |
Fields inherited from interface javax.faces.component.NamingContainer |
SEPARATOR_CHAR |
Constructor Summary | |
UIXTree()
Construct an instance of the UIXTree. |
Method Summary | |
protected FacesBean.Type |
getBeanType()
|
javax.faces.el.MethodBinding |
getDisclosureListener()
Gets a method reference to a disclosure listener |
java.lang.String |
getFamily()
|
TreeState |
getTreeState()
Gets The expansion state for this component. |
java.lang.Object |
getValue()
Gets the hierarchy of tree data - must be of type oracle.adf.view.faces.model.TreeModel |
java.lang.String |
getVar()
Gets Name of the EL variable used to reference each element of the tree. |
boolean |
isImmediate()
Gets whether or not data validation - client-side or server-side - should take place when events are generated by this component. |
void |
setDisclosureListener(javax.faces.el.MethodBinding disclosureListener)
Sets a method reference to a disclosure listener |
void |
setImmediate(boolean immediate)
Sets whether or not data validation - client-side or server-side - should take place when events are generated by this component. |
void |
setTreeState(TreeState treeState)
Sets The expansion state for this component. |
void |
setValue(java.lang.Object value)
Sets the hierarchy of tree data - must be of type oracle.adf.view.faces.model.TreeModel |
void |
setVar(java.lang.String var)
Sets Name of the EL variable used to reference each element of the tree. |
Methods inherited from class oracle.adf.view.faces.component.TreeBase |
addDisclosureListener, encodeBegin, getDisclosureListeners, getFirst, getLocalClientId, getPath, getRowCount, getRowData, getRowIndex, getRowKey, getRows, getSelectionState, getTreeModel, isRowAvailable, isRowContainer, popPath, processDecodes, pushPath, removeDisclosureListener, restoreStampState, restoreState, saveStampState, saveState, setPath, setRowIndex, setRowKey |
Methods inherited from class oracle.adf.view.faces.component.CollectionBase |
broadcast, processUpdates, processValidators, queueEvent |
Methods inherited from class oracle.adf.view.faces.component.UIXComponentBase |
addFacesListener, createFacesBean, decode, encodeChildren, encodeEnd, findComponent, getAttribute, getAttributes, getBooleanProperty, getChildCount, getChildren, getClientId, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getIntProperty, getParent, getProperty, getPropertyKey, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, setAttribute, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setValueBinding, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final FacesBean.Type TYPE
public static final PropertyKey VAR_KEY
public static final PropertyKey VALUE_KEY
public static final PropertyKey TREE_STATE_KEY
public static final PropertyKey IMMEDIATE_KEY
public static final PropertyKey DISCLOSURE_LISTENER_KEY
public static final java.lang.String COMPONENT_FAMILY
public static final java.lang.String COMPONENT_TYPE
Constructor Detail |
public UIXTree()
Method Detail |
public final java.lang.String getVar()
getVar
in interface CollectionComponent
getVar
in class CollectionBase
public final void setVar(java.lang.String var)
public final java.lang.Object getValue()
getValue
in class TreeBase
public final void setValue(java.lang.Object value)
public final TreeState getTreeState()
getTreeState
in class TreeBase
public final void setTreeState(TreeState treeState)
setTreeState
in class TreeBase
treeState
- the new expansion statepublic final boolean isImmediate()
isImmediate
in class TreeBase
public final void setImmediate(boolean immediate)
public final javax.faces.el.MethodBinding getDisclosureListener()
getDisclosureListener
in class TreeBase
public final void setDisclosureListener(javax.faces.el.MethodBinding disclosureListener)
public java.lang.String getFamily()
getFamily
in class UIXComponentBase
protected FacesBean.Type getBeanType()
getBeanType
in class UIXComponentBase
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |