The GEOSS Discovery And Access Broker APIs
Authors: Fabrizio Papeschi, Mattia Santoro, Stefano Nativi
API version: 1.4.3-beta

GINodeTree

Module: UI

This control is based on the YUI TreeView Control version 2.9.0 (scripts are included in the minified version of the API) and provides a hierarchical representation of a DAB node (the root of the tree).

  • Required CSS:

                         <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/fonts/fonts-min.css" />
                         <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/treeview/assets/skins/sam/treeview.css" />

When a tree node is expanded, the method expand is called on the correspondent GINode available in the data property of the expanded tree node (if the GINode is simple the tree node is not expanded). The maximum number of nodes that can be retrieve at each call of the expand method can be set with options.pageSize or by means of the GINodeTree/pageSize:method method (the default is 10). If the expanded tree node has more than GINodeTree/pageSize:method children, a special tree node is created with the title "Click to get more results..."; by expanding this node the expandNext method is called on the correspondent parent GINode.

As depicted in the image above (the test page is available here) each GINode is rendered using its report title; rendering and/or functionalities customization (e.g. icons visualization besides the title) can be done with the options.onCreateNode and options.onLoadComplete functions (see also GINodeTree/onCreateNode:method and GINodeTree/onLoadComplete:method methods)

Constructor

GINodeTree

(
  • dabNode
  • divId
  • [options]
)

Parameters:

  • dabNode DAB

    the DAB node which is the root of tree hierarchy

  • divId String

    the id of the <div> in which to insert the tree

  • [options] Object optional

    object literal of optional properties

Item Index

Properties

Properties

tree

YAHOO.widget.TreeView

The tree which renders the DAB node hierarchical structure

treeRoot

YAHOO.widget.HTMLNode

The root of the tree with the DAB node in the data property