Skip to Content
0
Former Member
May 05, 2014 at 09:21 AM

drag & drop support for sap.ui.commons.TreeNode

100 Views

Hi,

I am using a sap.ui.commons.Tree which consists of several sap.ui.commons.TreeNode elements. How can I add drag&drop support for these treenode elements? Basically all I want is to get a notification as soon as the user drags one TreeNode element over another TreeNode element (re-ordering is not necessary).

I've tried something like

<script src="resources/sap-ui-core.js"

id="sap-ui-bootstrap"

data-sap-ui-libs="sap.ui.commons, sap.ui.table, sap.ui.ux3, sap.viz"

data-sap-ui-theme="sap_goldreflection">

</script>


<script>

$.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-core');

$.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-widget');

$.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-mouse');

$.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-draggable');


...add the tree here...


$(function () {

$(".sapUiTreeList .sapUiTreeNode").draggable();

});

which does not work.

Best regards,

Christian