In Servoy “DB Tree View ” and “DB Tree Table View” beans are used to implement tree like structures . Generally the entire tree is based on one single table . The root nodes and the child nodes are based on one single table using the “Parent_to_Child” relation . And the parent to child relation is always a Single relation . But it is possible to implement for multiple tables and relations.
1. Multiple Table Implementation:
If there is a situation in which we want the root nodes to be based on one table and the child nodes to be based on another table. Then it is only possible by creating two separate bindings for two different tables.
// First Binding for the Parent Table.
var Binding1 = elements.bean_Tree.createBinding(' Parent Table');
// Second Binding for the Child Table.
var Binding2 = elements.bean_Tree.createBinding('Child Table');
2. Multiple Relations Implementation:
There can be a need to show two different sets of child nodes for a particular parent node which is based on two different relations . This is only possible by using function Binding.NRelationDataprovider(‘clc Name’). We need to create a calculation which returns correct relation depending on the condition.
// N Relation Name.
// Code for the Calculation