Der XdevTree ist eine Auswahl-Komponente, mit der sich hierarchische Daten abbilden lassen. Jeder Tree hat eine Root node, von der alle anderen Nodes ausgehen. Die Root kann wahlweise angezeigt werden oder nicht. An jeder Node können beliebig viele weitere Nodes hängen, die als Children bezeichnet werden. Eine Node mit Children wird als Parent bezeichnet. Der Anwender kann bei Bedarf Nodes mit Children ein- und ausklappen selektieren. Standardmäßig werden die Daten erst beim Ausklappen einer Node lazy durch das RapidClipse Framework nachgeladen. Auch Drag-and-Drop wird unterstütztThe 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.
Wichtige Properties:
Include Page Property Auto query data Property Auto query data Include Page Property Caption Property Caption Include Page Property Entity Property Entity Include Page Property ItemCaptionFromAnnotation Property ItemCaptionFromAnnotation Include Page Property ItemCaptionValue Property ItemCaptionValue Include Page Property Description Property Description - Preload all - Lädt initial den gesamten TreeInitially loads the entire tree.
- ReadOnly
Include Page Property Required Property Required Include Page Property RequiredError Property RequiredError Include Page Property TabIndex Property TabIndex
...
Important events:
- Misc
- nodeCollapse - Event wird beim Einklappen eines Eintrags ausgelöst Event is triggered on collapsing an entry.
- nodeExpand - Wird ausgelöst, wenn ein Knoten ausgeklappt wird. Die Id des Items kann aus dem Is triggered if the column width is changed. The id of the item can be read from the Tree.CollapseEvent-Objekt ausgelesen werdenObject.
...
Data binding:
- Daten-Container (ModelData container (model)
XdevBeanItemContainer - Standard Daten-Container. Die Zuweisung erfolgt mit der Methode setContainerDataSource. Bei dieser Methode ist allerdings nur eine Element-Ebene möglichdata container. The allocation is set using the setContainerDataSource method. However, with this method, only an element level is possible.
Code Block language java theme Confluence // Generates a new XdevBeanItemContainer 'productList' XdevBeanItemContainer<Product> productList = new XdevBeanItemContainer<Product>(Product.class); // Sets the XdevBeanItemContainer tree.setContainerDataSource(productList);
XdevHierarchicalBeanItemContainer - Wird von Is used by RapidClipse verwendet, wenn der Tree über die Properties konfiguriert wird, if the tree is configured using the properties.
Code Block language java theme Confluence 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 );
Examples:
Root sichtbar oder unsichtbar
Initial gesamter Tree ausgeklappt / zugeklappt
Selektierte Node zurückgeben
Bestimmte Node finden
Node per Drag-and-Drop verschieben
Mehrere Werte an eine Node hängen mit Semikolon getrennt
Neue Node hinzufügen
Selektierte Node entfernen
Einträge hinzufügen - Weist dem XdevTree manuell Einträge hinzu.
- Icons Ändern, evt. jeder Ebene ein eigenes Icon oder für jeden Datentyp ein eigenes Icon
...
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.
- Change icons, possibly a separate icon for each level or a separate icon for each data type