The XdevTree is a selection component with which you can map hierarchical data. Each tree has a root node from which all the other nodes branch out. You have the option of displaying or not displaying the root. Each node has a lot of further nodes hanging onto it, which are called as Children. A node with children is called as parent node. The user can select nodes with collapsing and expanding children. By default, the data is lazy reloaded only on expanding a node using the RapidClipse framework. Even drag-and-draop is supported.
XdevBeanItemContainer - Standard data container. The allocation is set using the setContainerDataSource method. However, with this method, only an element level is possible.
// Generates a new XdevBeanItemContainer 'productList' XdevBeanItemContainer<Product> productList = new XdevBeanItemContainer<Product>(Product.class); // Sets the XdevBeanItemContainer tree.setContainerDataSource(productList); |
XdevHierarchicalBeanItemContainer - Is used by RapidClipse, if the tree is configured using the properties.
tree.setContainerDataSource( // new TreeDataProvider for this tree. Inserts all root nodes with findAll and defines two additional levels TreeDataProvider.New(DAOs.get(EmployeeDAO.class).findAll()) .addLevel(Employee::getOrders).addLevel(Order::getOrderdetails), false ); |
Root visible or not visible
Initially entire tree expanded / collapsed
Return selected node
Locate specific node
Move node using drag and drop
Attach multiple values to a node separated with semicolon
Add new node
Remove selected node
Add entries - Manually adds entries to the XdevTree.