Drag & Drop
This project demonstrates the following concepts of the CUBA platform:
- Extending functionality of screens defined in the platform.
- Using screen companions.
- Adding drag-n-drop functionality to standard CUBA UI components.
A user should be able to move users between groups in the Access Groups screen using drag-n-drop.
Open the project in CUBA Studio, execute Run > Create database, then Run > Start application server and open the application at
Open the Administration > Access Groups screen.
You can drag a user from the table and drop it to a group to move it to this group.
com/company/dd/gui/group/group-browse-ext.xmlscreen in the GUI module extends the
group-browse.xmlscreen of the platform. The screen is registered in the
screens.xmlwith the same identifier as the base screen (
sec$Group.browse), so it will replace the base screen in the application.
group-browse-ext.xmlscreen descriptor defines a companion class for the web client:
GroupBrowseExtscreen controller defines the interface for the companion and delegates initialization of the drag-n-drop functionality to the companion implementation.
GroupBrowseCompanion.initDragAndDrop()method obtains Vaadin components from CUBA table and tree and initializes their drag-n-drop parameters.
Based on CUBA Platform 6.6.1
Please use https://www.cuba-platform.com/discuss for discussion, support, and reporting problems coressponding to this sample.