LSPS documentation logo
LSPS Documentation
Deprecated Components

The components described in this section are deprecated and will be removed in the next release.

Tree

The Tree ( ) component renders as a tree of nodes. The nodes are expandable unless they are leaf nodes, that is, they do not have any children. Whenever a node is expanded its child nodes are lazy-loaded. To acquire the child nodes, the Tree component calls the closure defined in the Children property. The closure returns a List<TreeItem> objects.

The TreeItem objects define the following:

  • label (String): arbitrary text displayed as the node label
  • expanded (Boolean): whether the node is expanded by default
  • data (Object): business object the tree item operates over

The Tree component serves as a picker of exactly one option (node). Once the user selects a node, the selection is stored in the Binding slot.

treeComponent.png
Tree with multiple nodes expanded
The Tree component has the following properties:

  • Label: visible label
  • Required: compulsoriness of the tree component

    If true, a mark indicating that the value is required is rendered in the component. > Important: The property does not provide any validation: the user > will be able to submit a null value even if it is set to true. To prevent > the submit, define a form validation on a listener.

  • Binding: reference to a slot that holds the selected tree option value (for example, a form variable or global variable)
  • Children: closure that returns a list of tree items which are displayed when a node is expanded
    { parent:Position, depth:Integer ->
        compact(
          collect(
            positions,
            { p:Position ->
              p.parent := parent ? new TreeItem (
                data ->p,
                expanded ->false,
                label -> p.name) : null
             }
          )
       )
    }
    
  • Read-only: editability

    If true, the tree renders as grayed out and no option can be selected. The selection uses the value of the binding slot.

  • Immediate: setting of immediate mode

    If true, the Immediate mode is active: any value changes are processed immediately.

  • Help text: tooltip text

    Note: You can define the Help text on the Help Text tab in the Properties view.

Tree Table

The Tree Table component renders as a table with rows organized in a tree structure with rows as tree nodes. Hence, child rows can be collapsed.

The component works similarly to the Table component. However while a table operates directly over business data types, the tree table component wraps the business data in the TreeTableItem data type objects. The object holds the along with business data also additional information. Based on the additional information, the tree table either expands the node that represents the business data or keeps it collapsed.

The tree table component iterates through a List<TreeTableItem> object. The TreeTableItem objects content can be then further processed (for example, displayed or provided for editing) in the table's columns.

The TreeTableItem objects define the following:

  • expanded (Boolean): whether the node is expanded by default
  • data (Object): business object the tree table item operates over (business data you want to work with in the tree table)
TreeTable.png
Tree Table with multiple nodes expanded
The Tree Table component has the following properties:

  • ID: component ID unique in the form (Only capital letters, digits, and underscores are allowed.)
  • Children: closure that returns a list of tree table items that are displayed when a node is expanded
  • Iterator: reference to an object of the business data type

    The object is used as iterator for the table tree items.

    Important:The iterator is not of the TreeTableItem type but of the type of your business data: the List<TreeTableItem> holds TreeTableItem objects, while the TreeTableItems objects hold the business objects in data and serve to provide the additional expanded property.

  • Help text: tooltip text

    Note: You can define the Help text on the Help Text tab in the Properties view.