How to Specify Node Content

29-14 Web User Interface Developers Guide for Oracle Application Development Framework When you use the node component’s rendered property in this way, you do not define a value for the node component’s type property.

29.3.5 How to Specify Ancestor Levels for an Anchor Node

The anchor node of a hierarchy viewer component is the root of the hierarchy returned by the tree binding. Depending on the use case, there can be multiple root nodes, for example, a hierarchy viewer component that renders an organization chart with one or more managers. When a hierarchy viewer component renders at runtime, the node that has focus is the anchor node. If a user double-clicks another node at runtime that has a value specified for its setAnchorListener property, that node becomes the anchor node. You can configure the hierarchy viewer to display one or more levels above the anchor node, the ancestor levels. For example, if you search for an employee in a company, you may wish to display the chain of management above the employee. Specify ancestor levels using the displayLevelsAncestor property. To specify the number of ancestor levels for an anchor node: 1. In the Structure window, right-click the dvt:hierarchyViewer node and choose Go to Properties .

2. Expand the Common section of the Property Inspector.

3. Specify the number of levels of ancestor nodes that you want to appear at runtime above the anchor node in the displayLevelsAncestor property. For example, the following entry appears in the JSF page if you entered 2 as the number of ancestor levels for the anchor node. displayLevelsAncestor=2 4. Save changes to the JSF page.

29.4 Navigating in a Hierarchy Viewer

By default, a hierarchy viewer component has downward navigation configured for root and inner nodes. You can configure the hierarchy viewer component to enable upward navigation and to determine the number of nodes to appear when a user navigates between nodes on the same level. For more information about node types, see Section 29.3, Managing Nodes in a Hierarchy Viewer.

29.4.1 How to Configure Upward Navigation in a Hierarchy Viewer

If you want to configure upward navigation for a hierarchy view component, you configure a value for the hierarchy viewer component’s navigateUpListener property. To configure upward navigation for a hierarchy viewer component: 1. In the Structure window, select dvt:hierarchyViewer and choose Go to Properties. 2. In the Property Inspector, expand the Behavior section of the Property Inspector and write a value for the hierarchy viewer component’s navigateUpListener property that specifies a method to update the data model so that it references the new anchor node when the user navigates up to a new anchor node.

3. Click OK.

Using ADF Hierarchy Viewer Components 29-15

29.4.2 How to Configure Same-Level Navigation in a Hierarchy Viewer

Same-level navigation between the nodes in a hierarchy viewer component is enabled by default. You can configure the hierarchy viewer component to determine how many nodes to display at a time. When you do this, controls appear that enable users to navigate to the following: ■ Left or right to view the next set of nodes ■ First or last set of nodes in the collection of available nodes To configure same-level navigation in a hierarchy viewer component: 1. In the Structure window, right-click the dvt:hierarchyViewer node and select Go to Properties .

2. Expand the Common section of the Property Inspector and specify the number of

nodes that you want to appear at runtime in the Nodes Per Level field levelFetchSize. For example, the following entry appears in the JSF page if you entered 3 as the number of nodes: levelFetchSize=3

3. Click OK.

29.4.3 What Happens When You Configure Same-Level Navigation in a Hierarchy Viewer

At runtime, the hierarchy viewer component renders the number of nodes that you specified as a value for the hierarchy viewer component’s levelFetchSize property. It also renders controls that allow users to do the following: ■ Navigate to the left or right to view the next set of nodes ■ Navigate to the first or last set of nodes in the collection of available nodes Figure 29–9 shows a runtime example where levelFetchSize=3. When a user moves the mouse over the control, as shown in the circled area in Figure 29–9 , the control that allows users to navigate to the last set of nodes appears. 29-16 Web User Interface Developers Guide for Oracle Application Development Framework Figure 29–9 Hierarchy Viewer Component with Same-Level Navigation

29.5 Adding Interactivity to a Hierarchy Viewer Component

You can configure a hierarchy viewer component to invoke popup windows and display menus with functionality and data from other pages in your Oracle Fusion web application.

29.5.1 How to Configure 3D Tilt Panning

By default, panning in a hierarchy viewer is accomplished by clicking and dragging the component to reposition the view, or by using the panning control in the Control Panel. In a hierarchy viewer with a large quantity of nodes, instead of browsing through a hierarchy viewer one page at a time, users can initiate a 3D tilt panning effect that animates the hierarchy viewer to visually fly through the hierarchy viewer nodes. Once set in motion toward the edge of a view, the effect continues automatically until it reaches the end of the nodes on an edge. Figure 29–10 shows the tilt panning effect as it reaches the edge of the view. Figure 29–10 Hierarchy Viewer 3D Tilt Panning Effect