Oracle Fusion Middleware Data Visualization Tools Tag Reference for Oracle ADF Faces 11g Release 1 (11.1.1.7.1) E12418-10 |
UIComponent class: oracle.adf.view.faces.bi.component.hierarchyViewer.UIHierarchyViewer
Component type: oracle.dss.adf.hierarchyViewer.HierarchyViewer
The ADF hierarchy viewer component displays hierarchical data as a set of linked nodes in a diagram. The nodes and links correspond to the elements and relationships to the data. The component supports pan and zoom operations, expanding and collapsing of the nodes, and rendering of simple ADF components within the nodes. A common use of the hierarchy viewer is to display an organization chart.
The hierarchy viewer component can have the following children: <af:dragSource>, <af:dropTarget>, <dvt:link>, <dvt:node>, <dvt:search>.
The <dvt:panelCard> can be used in conjunction with <dvt:node>. See the documentation for those tags for more information.
The following example shows XML for a hierarchyViewer tag.
<dvt:hierarchyViewer id="hierarchyViewer1" layout="hier_vert_top" inlineStyle="width:100%;height:600px;" var="node" value="#{bindings.rootEmp1.treeModel}">
<dvt:link linkType="directRounded"/>
<dvt:node width="233" height="233">
<f:facet name="zoom100">
<af:panelGroupLayout layout="vertical" inlineStyle="width:100%;height:100%;padding:5px">
<af:panelGroupLayout layout="horizontal">
<af:panelGroupLayout inlineStyle="width:85px;height:120px">
<af:image source="#{node.Thumburl}"/>
</af:panelGroupLayout>
<af:spacer width="5" height="5"/>
<af:panelGroupLayout layout="vertical">
<af:outputText value="#{node.Firstname}" inlineStyle="font-weight:bold;font-size:20px;color:#383A47"/>
<af:outputText value="#{node.Lastname}" inlineStyle="font-size:20px;color:#383A47"/>
<af:outputText value="#{node.Title}" inlineStyle="font-size:11px;font-style:italic;color:#383A47"/>
</af:panelGroupLayout>
</af:panelGroupLayout>
</af:panelGroupLayout>
</f:facet>
</dvt:node>
</dvt:hierarchyViewer>
By default, the hierarchy viewer displays a gradient background that transitions from its background-color to white. The gradient can be turned off so that the background is a solid color by specifying the custom attribute "fill-type:solid" in the inlineStyle attribute on the <dvt:hierarchyViewer> tag.
The hierarchy viewer can be used as both a drag source and a drop target. To do so, a developer must add one or both of the <af:dragSource> and <af:dropTarget> tags as direct children of the <dvt:hierarchyViewer> tag. The following example shows a hierarchy viewer configured as both a drag source and a drop target.
<dvt:hierarchyViewer>
One or more nodes may be dragged from the hierarchy viewer. Multiple selection must be enabled on the hierarchy viewer to allow dragging multiple nodes. To drag multiple nodes, the set of nodes must be selected before dragging, and the drag must be initiated on a selected node in the set. The data in the transferable for a drag originating from a hierarchy viewer will be of type org.apache.myfaces.trinidad.model.RowKeySet.
<af:dragSource actions="COPY MOVE" defaultAction="MOVE" />
<af:dropTarget dropListener="#{myBean.dropListener}" actions="COPY MOVE" >
<af:dataFlavor flavorClass="java.lang.Object" />
<af:dataFlavor flavorClass="org.apache.myfaces.trinidad.model.RowKeySet" />
</af:dropTarget>
<dvt:node ... > ... </dvt:node>
</dvt:hierarchyViewer>
A drop on a hierarchy viewer can occur on a node or on the background. The java.util.Map drop site retrieved from the drop event will contain a value for the "clientRowKey" key. This value will specify the client row key for the node on which the drop occurred, or null if it occurred on the background.
Type | Phases | Description |
---|---|---|
org.apache.myfaces.trinidad.event.AttributeChangeEvent | Invoke Application, Apply Request Values |
Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing. |
Name | Type | Supports EL? | Description |
---|---|---|---|
attributeChangeListener | javax.el.MethodExpression | Only EL | a method reference to an attribute change listener. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing. |
binding | String | Only EL | binding reference to store the UIHierarchyViewer component |
contentDelivery | String | Yes | Valid Values: whenAvailable, lazy, immediate Default Value: whenAvailable Options are "lazy", "immediate", and "whenAvailable". If "lazy", then the hierarchyViewer content is fetched after the hierarchyViewer is sent to the browser. If "immediate", then the hierarchyViewer content is immediately sent to the browser. If "whenAvailable", then "immediate" content delivery is used if the data is already available; otherwise "lazy" content delivery is used. The default value is "whenAvailble". |
controlPanelBehavior | String | Yes | Valid Values: initCollapsed, initExpanded, hidden Default Value: initCollapsed Specifies the behavior of the control panel. Valid values are:
|
customizationId | String | Yes | This attribute is deprecated. The 'id' attribute should be used when applying persistent customizations. This attribute will be removed in the next release. |
detailWindow | String | Yes | Valid Values: default, none Default Value: default Specifies whether to show the detail window. Valid values are:
|
disclosedRowKeys | org.apache.myfaces.trinidad.model.RowKeySet | Yes | the set of disclosed rows for this component. Each entry in the set is a rowKey. |
displayLevelsAncestor | int | Yes | The number of ancestor levels to display during initial render. This property is 0-based. A value of 0 means that no ancestor levels above the root will be shown. The default value is 0. |
displayLevelsChildren | int | Yes | The number of child levels to display during initial render. This property is 0-based. A value of 0 means that no child levels below the root will be shown; the root itself will be shown. The default value is 1, which means that the root and the first level of children will be shown. |
dontPersist | String[] | Yes | List of persistent attributes that are restricted from persisting to a registered "Persistent Change Manager". Persistent attributes would still persist to a session. |
emptyText | String | Yes | The text of an empty hierarchy viewer. |
id | String | Yes | the identifier for the component |
inlineStyle | String | Yes | The inline style of the hierarchy viewer's outer DOM element. Can be used to control the size/position of the hierarchy viewer. |
layout | String | Yes | Valid Values: hier_vert_top, hier_vert_bottom, hier_horz_left, hier_horz_right, hier_horz_start, hier_horz_end, tree, radial, circle Default Value: hier_vert_top Specifies the layout of the hierarchy. Valid values are:
|
levelFetchSize | int | Yes | Default Value: 25 Specifies the number of child nodes that will be fetched and displayed at a single time for each expanded parent node. Additional child nodes may be fetched and displayed by using the lateral navigation controls shown in the hierarchy viewer. The default value is 25. The name of this attribute is levelFetchSize. |
navigateUpListener | javax.el.MethodExpression | Only EL | a method reference to a navigate up action listener, the method is invoked when the end user tries to navigate up from the current root node |
nodeSelection | String | Yes | Valid Values: none, single, multiple Default Value: multiple Specifies the selection mode. Valid values are:
|
panning | String | Yes | Valid Values: default, tilt Default Value: default Specifies panning behavior. Valid values are:
|
partialTriggers | String[] | Yes | the IDs of the components that should trigger a partial update. This component will listen on the trigger components. If one of the trigger components receives an event that will cause it to update in some way, this component will request to be updated too. |
persist | String[] | Yes | List of persistent attributes that are persisting to a registered "Persistent Change Manager". Persistent attributes, by default, always persist to a session. |
rendered | boolean | Yes | Default Value: true Specifies whether the component is rendered |
rowDisclosureListener | javax.el.MethodExpression | Only EL | a method reference to a rowDisclosure listener, the method is invoked when a node is expanded or collapsed |
selectedRowKeys | org.apache.myfaces.trinidad.model.RowKeySet | Yes | the set of selected rows for this component. Each entry in the set is a rowKey. |
selectionListener | javax.el.MethodExpression | Only EL | a method reference to a selection listener, the method is invoked when the selected nodes are changed.public void nodeSelected(SelectionEvent selectionEvent) { UIHierarchyViewer hv = (UIHierarchyViewer) selectionEvent.getSource(); RowKeySet addedSet = selectionEvent.getAddedSet(); Iterator i = addedSet.iterator(); TreeModel model = (TreeModel)hv.getValue(); model.setRowKey(i.next()); Object selectedNode = model.getRowData(); //then cast the selected node to the tree model specific type //in this example, it is a single selection model, so, you only need to get the only rowkey in the selection event // note, the selectionEvent is of org.apache.myfaces.trinidad.event.SelectionEvent //... } |
styleClass | String | Yes | Sets a CSS style class to use for this component. |
summary | String | Yes | Sets a summary of this hierarchy viewer's purpose and structure for user agents rendering to non-visual media (e.g. screen readers). |
value | String | Yes | the data model for the hierarchy viewer - can be an instance of javax.faces.TreeModel |
var | String | Yes | Name of the EL variable used to reference each element of this collection. Once this component has completed rendering, this variable is removed (or reverted back to its previous value). |