About HGrid and its Named Children

The hGrid component is a combination of two other ADF UIX components: It extends the tree component while imitating the format of the table component.

Use the hGrid component to display tree-structured data in a table-like format. Each row corresponds to a tree node. While a tree component support multiple roots, hGrid supports only a single root that is a DataObject (and not a DataObjectList as in a tree). You can use hGrid with very large data trees because the hGrid component also supports zooming in and out of subtrees (i.e., focus in and out).

HGrid component

The hGrid component creates an object hierarchy column that contains the tree nodes, and a focus column that contains the zoom in or focus icons. The root of the tree displays just below the column headers.

In the object hierarchy column, the user can expand (view) or collapse (hide) the children of a tree node. In the focus column, a focus icon displays in each tree node that contains one or more subtrees. The focus column is used to select a new root for the tree. This allows users to zoom into subtrees of a massive tree.

When the user clicks a focus icon, the hGrid component renders a breadcrumbs area above the column headers, which show all the parent nodes above the current focus root. This allows the user to focus out (or zoom out) of the current subtree. At the same time, the hGrid also renders text links to allow the user to quickly expand or collapse all the nodes under the current focus root.

HGrid with focus root and bread crumbs

As in a tree component, a nodeStamp may be used to render the contents of the object hierarchy column. The default column header for this object hierarchy column is 'Name'. You can, however, change the default by defining a column component as the nodeStamp and by setting a columnHeader named child on that column.

The rest of the appearance of hGrid is controlled in a manner that is similar to the table component. Use the columnHeaderData attribute and the columnHeaderStamp named child to specify the column headers. The column values are set as indexed children (or contents) of hGrid. Various format options may be set using the tableFormat, columnFormats and columnHeaderFormats attributes.

Tip: It may be undesirable to allow the user to expand all nodes in cases where the number of elements in a subtree is huge. To disable the expand-all feature for a tree node, set the expandAll attribute to false on the nodes element. Alternatively, set the value of the key ClientStateHGridDataProxy.EXPAND_ALL_KEY to Boolean.FALSE.

HGrid attributes

The attributes you can set for hGrid are:

For more details about ADF bindings and the Data Control Palette, see:

HGrid named children

The hGrid component supports the following named children:

Note: Row formatting options, table navigation, and detail-disclosure are not supported on hGrid.


About HGridDataProxy
About Tree
About BrowseMenu

Creating an HGrid
Working with Table Components

 

Copyright © 1997, 2004, Oracle. All rights reserved.