Basics

This document covers the following topics:


Types of Trees

The following controls are available for building trees:

  • TREENODE3
    This control displays a single tree node. It can be put into the normal control grid (ROWTABLEAREA2), and can consequently be combined with any other control (for example, FIELD, TEXTOUT, etc.).

    graphics/image141.png

    Of course, you do not have to combine it with other controls. You can also use it "stand-alone" inside a ROWTABLEAREA2 grid:

    graphics/image142.png

    As with the normal ROWTABLEAREA2 management, only these items are transferred from the server to the client which are currently visible. Items which are collapsed or which are not in the visible area of the client, are not transferred.

    All scrolling of items and all toggling of items (opening/collapsing) goes through the server.

  • CLIENTTREE
    This control represents a whole tree. You cannot add further controls into the tree node lines.

    graphics/image143.png

    The data which is displayed inside the tree is transferred from the server to the client in one step - always the whole tree. The data is transferred when opening a page or when the tree data in the server is updated.

    All scrolling of items and all toggling of items (opening/collapsing) is done in the client without going back to the server.

When to Use Which Type

Use the TREENODE3 control inside the control grid ROWTABLEAREA2 in the following cases:

  • High number of tree nodes.

  • Tree nodes are not loaded from the beginning, but step by step.

  • Data in the tree is exchanged/updated quite often.

Use the CLIENTTREE control in the following cases:

  • Low number of tree nodes (100).

  • High interactivity requirements for toggling nodes.

  • Data in the tree is rather static. It is loaded once into the client, and afterwards it is not changed anymore.

Example: in the Application Designer environment, the tree controls are used in the following way:

  • In the workplace, a CLIENTTREE is loaded: the number of nodes is quite low, the tree represents a menu which is rather static.

  • In the Layout Painter, a TREENODE2 in a ROWTABLEAREA2 is used for representing the XML control tree: the number of items can be quite high, the update rate of the tree data is very high.