I have created drag and drop functionality in sap ui5 app as mentioned link.
1) when working with single view & controller, drag and drop functionality is working fine. 2) when working with multiple view and controller, if my drag & drop view is not my initial view. drag and drop functionality is not working.
1) I have tried to load the libraries at controller level and component level. it is working fine when there is only one view and controller. 2) but the same is not working when there are multiple views and controllers, majorly when I am navigating to the drag drop screen from other screen. If drag and drop view is the initial view, then also it is working fine.
1)at controller level & component level I have written like below in both the cases
jQuery.sap.require("DragNDropDragNDrop.model.widget");
jQuery.sap.require("DragNDropDragNDrop.model.mouse");
jQuery.sap.require("DragNDropDragNDrop.model.sortable");
jQuery.sap.require("DragNDropDragNDrop.model.droppable");
jQuery.sap.require("DragNDropDragNDrop.model.draggable");
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/ui/model/json/JSONModel",
'sap/m/MessageBox'