cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Check this snippet, Wrap the function inside document.ready.

http://jsbin.com/wulof/2/edit

Regards

Sakthivel