Table-Bean 1.3 adds Drag and Drop to the Tree bean

We are proud to announce version 1.3 of the Table-Bean which offers a new bean, the DndDBTreeViewBean (pronounce: “Drag and drop database tree view bean”). The DndDBTreeViewBean is an extension of Servoy’s own DBTreeViewBean, enhanced by support for Drag&Drop, context menus and useful helper methods. You can use Drag&Drop inside the tree itself, from a table to the tree, from the tree to another tree or table.

To see Drag&Drop in a Tree in action go to our website.

Please not that the DndDBTreeViewBean requires Servoy 3.5.2 or greater. Since the bean is an extension of Servoy’s own bean, it will automatically "“inherit” new functionality added to the DBTreeViewBean. So if a new version of Servoy is released, there will be no need to update the DndDBTreeViewBean.

The following helper methods are also available:

  • treeType property to make the tree either single selection, contiguous multiple selection or discontiguous multiple selection
  • getSelectedRootRecord() to receive the top level record of a selected node
  • getSelectedChildFoundset() to get a foundset of children of the selected node
  • getSelectedParentRecord() to get the parent record of the selected node
  • getSelectedRecord() to get the selected node as record variable
  • getSelectedRecords() to get the selected nodes as record variable array (only useful if treeType is not single selection)
  • isDragged() to figure out if a selection was made because of a drag&drop operation
  • isRightClick() to figure out if a selection was made because of a right click
    The Table-Bean itself also includes many new features:
  • added selectedColumnBgColor to set the background color of the selected (sorted) column
  • added selectedColumnFgColor to set the font color of the selected (sorted) column
  • added selectedColumnFont to set the font of the selected (sorted) column
  • added setHeaderFgColor to set the font color of the header (or a specific column of the header)
  • added setHeaderBgColor to set the background color of the header (or a specific column of the header)
  • added setHeaderFont to set the font of the header (or a specific column of the header)
  • added setColumnFgColor to set the font color of a specific column
  • added setColumnBgColor to set the background color of a specific column
  • added setColumnFont to set the font of a specific column
  • setColumnWidths is deprecated. Use the property .columnWidths to set columnWidths. This change allows you to retrieve the current column widths and restore the user’s settings at a later point.
    Here is a screenshot showing some of the new coloring and font options for columns:

The update is free for registered users and can be obtained from our website.

Do any sample solutions exist for this bean or any written documentation?

A sample solution is installed into Servoy/solutions. All methods and properties have extensive tooltips, some important methods also have sample code. Hope this helps to get started.

There is indeed and it is a very well done sample solution. Thank you.

Glad it helps you!