Skip to Main Content
Feature Request FR-2220
Product Area Page Components
Status ROADMAP

59 Voters

Allow Tree region nodes to be dragged and dropped (within and between trees)

doug gault Public
· Nov 29 2021

Idea Summary
Tree nodes in an APEX Tree region should be draggable and droppable - both within the same tree and between tree regions. 

Use Case

Within the same tree

  1. Reordering sub-nodes within a parent node.
  2. Move sub-nodes between parent nodes.

Between two Trees

  1. Move a node from one tree to another, allowing users to populate the target tree from options displayed in the source tree.
    • This might potentially contain two options:
      • COPY the selected node to the targe tree
      • MOVE the selected node to the target tree

Preferred Solution (Optional)
Ideally there would be a few different attributes that would help to properly implement this idea. 

  • Node/level Type  - Allows you to define the node type. Can be used to limit the target parent for a dragged node
  • Allow Drag - Allow nodes to be dragged from or within a tree
  • Allow Drop - Allow nodes to be dropped onto a tree
  • Copy or Move - Defines whether the dragged node persists in its original position

Examples 
https://www.grapecity.com/wijmo/demos/Nav/TreeView/Nodes/DragandDropBetweenTrees/purejs

https://www.lidorsystems.com/help/integralui/web-components/treeview/drag-drop-between-treeviews/

This is currently on the roadmap for a future release of Oracle APEX.

Comments

Comments

  • doug gault OP 3.6 years ago

    I should have sighted the fact that the APEX page builder itself allows for drag and drop of tree nodes within the component tree to be able to move and re-order components. 

    It seems that this would be a natural thing to add to the native tree component within APEX if APEX itself saw the need for it.

  • william.endress OP 3.6 years ago

    This is critical to an app I would like to build with native APEX components.  This app uses one tree for data sources (tables and columns) and another to represent a hierarchical business model.  The app creates new elements of the model by dragging columns into roles (hierarchies, levels, and attributes) and, sorts levels within a hierarchy by moving nodes, and the order of levels in the model by moving nodes.

    This method eliminates the need to pick tables and columns from select lists and 90% of the typing.  Very fast, very easy, very visual.

     

  • gpgrimes2 OP 2 years ago

    I'm sure this might be a different suggestion, allow nodes to dropped into non-tree regions.

  • john.snyders APEX Team OP 2 years ago

    @gpgrimes2  Yes, drop on non-tree regions would naturally be considered but it has the added complication that APEX does not have general drag and drop support for other regions. It could also be desired that you drag from something else and drop on the tree. The existing treeView widget drag and drop does support jQuery UI drag sources and drop targets. It is not exactly clear how general drag and drop support would be made fully declarative.