Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
We have re-enabled the option to post and create content. Email notifications are currently still turned off while we finish up steps related to badges and content retagging.
Subscribe for more.
In this tutorial I'll explain how you can make a sap.m.List sort-able by letting the user drag and drop the list items. For a demo of what this looks like, have a look at this video:
In Eclipse, create a new SAPUI5 project. In your index page, the following code is important:
Jquery UI provides an easy way to implement sorting, dragging, dropping,... By importing these libraries we can make use of these functionalities in our SAPUI5 project.
In our view we create our list, don't forget to give your list an ID, we need this in the controller:
In our controller we do the following:
We access our list and we need to put the sort-able function specifically on the <UL> element of the list.
And that's it, with this short peace of code you can make your sap.m.list sort-able by using drag and drop.