template_banner.gif Main Index  PREV  NEXT

Valid HTML 4.01!   Valid CSS!

Tree Forms

Overview

This type of function is used to display a structure hierarchy in tree form, similar to that provided by the Explorer in Microsoft Windows. This contains objects known as NODES and LEAVES.

NODES can be arranged in hierarchies of any depth. Each NODE can have one parent and any number of children. A NODE which is at the top of the structure does not have a parent and is known as a ROOT NODE.

LEAVES are objects which are attached to NODES. A LEAF can be attached to one (and only one) NODE in the structure, but cannot have anything else attached to it.

In the context of Windows Explorer NODES are directories or folders, and LEAVES are files.

Any path (or branch) within the structure starts at a ROOT NODE and progresses down a different child NODE at each lower level until it terminates. A branch may terminate at a NODE or a LEAF.

When viewing a tree structure the user may open up any branch by clicking on the expand (+) symbol next to a node. Conversely, any branch may be closed by clicking on the collapse (-) symbol.

All the Tree templates described here were built using the database structure shown in Figure 1. This is described fully in a separate document called A Flexible Tree Structure.

Figure 1 - Database Structure

tree_image001.gif

This database structure provides the following characteristics:-



Tree 1 - display Tree details, with navigation bar

CT_TREE1.gif

Description

For an overview of all Tree forms please go here.

This type of form is used to display a hierarchical structure in tree form using the Two Pane view. Options on the navigation bar may allow the user to add, amend, or delete any node in the structure.

Upon initial entry the form will retrieve an occurrence of Tree Type using the primary key passed down from the parent form. The screen will then display the root node(s) for the selected structure. The user may traverse any branch of the structure as required.

The contents of the right-hand pane may be changed by selecting one of the radio buttons labelled List, Icon, or Details. These have the same effect as the options in the Windows Explorer.

Data for this form is obtained from two services:-

Buttons

CLOSE Exit and return to the parent form.

Contents

Bound Objects

Source Entity Source Field Target Entity Target Field
ACTION_BAR.INF CLOSE ACTION_BAR CLOSE
NAVIGATION_BAR FIRST    
  LAST    
TREE_TYPE FIRST    
  TREE_FIELD    
  LIST_VIEW    
TREE_NODE N/A   N/A
TREE_LEAF N/A   N/A

Local Constants (Refer to Local Constants)

Name Expression Description
FORM_VERSION 01.000.000 To be incremented each time the component is changed.
LEAF_SERVICE   The name of the service which will retrieve LEAF details. This should be constructed from the Tree Service (Leaves) template.
NODE_SERVICE   The name of the service which will retrieve NODE details. This should be constructed from the Tree Service (Nodes) template.

Component Variables (Refer to Component Variables)

Name Description
FORM_VERSION  
PARAMS  
FORMATS Stores the formats for the columns in the list view (right hand pane).
LABELS Stores the labels for the columns in the list view (right hand pane).
SETTINGS Stores the currents contents of the tree view (left hand pane).

Tree 2 - display Tree details, without navigation bar

CT_TREE2.gif

Description

For an overview of all Tree forms please go here.

This type of form is used to display a hierarchical structure in tree form using the Two Pane view.

Upon initial entry the form will retrieve an occurrence of Tree Type using the primary key passed down from the parent form. The screen will then display the root node(s) for the selected structure. The user may traverse any branch of the structure as required.

The contents of the right-hand pane may be changed by selecting one of the radio buttons labelled List, Icon, or Details. These have the same effect as the options in the Windows Explorer.

Data for this form is obtained from two services:-

Buttons

CLOSE Exit and return to the parent form.

Contents

Bound Objects

Source Entity Source Field Target Entity Target Field
ACTION_BAR.INF CLOSE ACTION_BAR CLOSE
TREE_TYPE FIRST    
  TREE_FIELD    
  LIST_VIEW    
TREE_NODE N/A   N/A
TREE_LEAF N/A   N/A

Local Constants (Refer to Local Constants)

Name Expression Description
FORM_VERSION 01.000.000 To be incremented each time the component is changed.
LEAF_SERVICE   The name of the service which will retrieve LEAF details. This should be constructed from the Tree Service (Leaves) template.
NODE_SERVICE   The name of the service which will retrieve NODE details. This should be constructed from the Tree Service (Nodes) template.

Component Variables (Refer to Component Variables)

Name Description
FORM_VERSION  
PARAMS  
FORMATS Stores the formats for the columns in the list view (right hand pane).
LABELS Stores the labels for the columns in the list view (right hand pane).
SETTINGS Stores the currents contents of the tree view (left hand pane).

Tree Popup 1 - Select a Tree Node

CT_TREE_POP1.gif

Description

For an overview of all Tree forms please go here.

This type of form is used to display the contents of a tree structure using only a single pane, the tree view.

The action taken upon initial entry depends on the existence of a parameter passed down by the parent process:-

The screen will display the root node(s) for the selected Tree Type. The user may traverse any branch of the structure as required before selecting the desired node.

Data for this form is obtained from a Node Service which must be constructed from the Tree Service (Nodes) template.

Buttons

SELECT Will return to the parent form with the primary key of the chosen Tree Node so that the popup field can be filled in with the relevant details from that entry.
CLOSE Return to the parent form without selecting an entry.

Contents

Bound Objects

Source Entity Source Field Target Entity Target Field
ACTION_BAR SELECT ACTION_BAR SELECT
  CLOSE   CLOSE
TREE_TYPE FIRST    
  TREE_FIELD    
  LIST_VIEW    
TREE_NODE N/A   N/A

Local Constants (Refer to Local Constants)

Name Expression Description
FORM_VERSION 01.000.000 To be incremented each time the component is changed.
NODE_SERVICE   The name of the service which will retrieve NODE details. This should be constructed from the Tree Service (Nodes) template.
POPUP_FORM   The name of the form that will be activated if the popup button popup_button.gif is pressed.

Component Variables (Refer to Component Variables)

Name Description
FORM_VERSION  
PROFILE Passed down by parent form.
SETTINGS Stores the currents contents of the tree view.
SELECTION Will contain the primary key of the selected occurrence.

Tree Service (Nodes) - retrieve Node details

CT_TREESRV_N.gif

Description

For an overview of all Tree forms please go here.

This component will retrieve NODE details for a tree structure. It is used to supply data for one of the form components TREE1, TREE2 or TREE POPUP1.

This component has the following operations:-

Buttons

N/A

Contents

Bound Objects

Source Entity Source Field Target Entity Target Field
TREE_TYPE TREE_TYPE_ID    
TREE_LEVEL TREE_LEVEL_ID    
TREE_NODE NODE_ID    
  NODE_ID_DESC    
  TREE_TYPE_ID    
  TREE_LEVEL_ID    
  NODE_ID_SNR    

Local Constants (Refer to Local Constants)

Name Expression Description
FORM_VERSION 01.000.000 To be incremented each time the component is changed.

Component Variables (Refer to Component Variables)

Name Description
FORM_VERSION  

Tree Service (Leaves) - retrieve Leaf details

CT_TREESRV_L.gif

Description

For an overview of all Tree forms please go here.

This component will retrieve LEAF details for a selected NODE in a tree structure. It is used to supply data for one of the form components TREE1 or TREE2.

A LEAF entity can be any entity which contains a NODE_ID field which acts as a foreign key to the TREE_NODE table.

Buttons

N/A

Contents

Bound Objects

Source Entity Source Field Target Entity Target Field
TREE_TYPE TREE_DATA    
TREE_NODE NODE_ID    
TREE_LEAF PKEY_LEAF    

Local Constants (Refer to Local Constants)

Name Expression Description
FORM_VERSION 01.000.000 To be incremented each time the component is changed.

Component Variables (Refer to Component Variables)

Name Description
FORM_VERSION  
PARAMS The primary key of the selected NODE.
VALREP The details of all LEAF objects attached to the selected NODE.

copyright.gif http://www.tonymarston.net