Skip to main content
Jump to: navigation, search


Wiki Home

Field that is used to display a tree.

  • implements: I obj.pngITreeField
  • extends: C obj.pngAbstractTreeField


A TreeField is used to display a tree. Unlike the TreeBox that is a value field working with a CodeType or a LookupCall and providing checkboxes to select values, the TreeField is low level: you need to handle your Tree directly.

The TreeField is also used internally: in an Outline based application, the tree of pages on the left is displayed in a TreeField.

Code Example

Scout provides additional classes (C obj.pngAbstractTreeNodeBuilder , C obj.pngAbstractTreeNode ) that might help you to instantiate your tree.

Here a code Snippet that constructs a tree given an array of LookupRows. The resulting field still differs from a TreeBox, because you have control of the tree and because this is not a value field.

public class TreeField extends AbstractTreeField {
  protected void execInitField() throws ProcessingException {
    //Fetch the LookupRows:
    MyLookupCallcall = new MyLookupCall();
    LookupRow[] lookupRows = call.getDataByAll();
    //Build the Tree:
    ITree tree = getTree();
    P_TreeNodeBuilder builder = new P_TreeNodeBuilder();
    ITreeNode[] children = builder.createTreeNodes(lookupRows, ITreeNode.STATUS_NON_CHANGED, true);
    tree.addChildNodes(tree.getRootNode(), children);
  public class Tree extends AbstractTree {
  public class P_TreeNodeBuilder extends AbstractTreeNodeBuilder {
    protected ITreeNode createEmptyTreeNode() throws ProcessingException {
      return new P_Node();
  public class P_Node extends AbstractTreeNode {



Defined with getConfiguredXxxxxx() methods.

See also the Field page for the properties that all fields have in common.


Defined with execXxxxxx() methods.

See also the Field page for the events that all fields have in common.

See Also

Back to the top