Hi,
I am trying to add the drag and drop functionality in the Webdynpro using the SAPUI5 element sap.m.UploadCollection. But I am unable to render the drop section in webdynpro. Below are the steps I have done to add the SAPUI5,
1. In the Webdynpro view added the HtmlIsLand and add the HtmlScripts element. In HTML scripts loaded the library ie,
/sap/public/bc/ui5_ui5/1/resources/sap-ui-core.js
/sap/public/bc/ui5_ui5/1/resources/sap/m/library.js
/sap/public/bc/ui5_ui5/1/resources/sap/m/UploadCollection.js
/sap/public/bc/ui5_ui5/1/resources/sap/m/UploadCollectionItem.js
/sap/public/bc/ui5_ui5/1/resources/sap/m/UploadCollectionRenderer.js
2. Created a MIME object with all the code for adding the UI element.
var oFileDrag1 = new sap.m.UploadCollection("drag_1", {
maximumFilenameLength: 50,
maximumFileSize: 30,
multiple: true,
sameFilenameAllowed: false,
instantUpload: true,
noDataDescription: "Drop files",
change: this.onChange,
uploadComplete: this.upload_complete,
uploadUrl :"/sap/opu/odata/SAP/CV_ATTACHMENT_SRV/OriginalContentSet"
});
oFileDrag1.placeAt("target");
//original_attachment.myCallBack.fireEvent('VisibleUI','true');
this.oFileUploader = oFileDrag1;
Now the element is rendered but the drop part is coming and if you see for "noDataDescription: 'Drop Files'", but the in output the text is different. The "+" is working perfectly and all events are triggering and able to add files.
Below are some images for your reference,
UI Element

When Trying to Drag a file

File uploaded using "+"

Your expert opinions will be very helpful.
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Danilo,
Thanks for the reply.
Yes, I tried all the attributes but the drag and drop functionality is not working. I am not sure if I am missing any libraries or anything else.
After some more analysis found when the element is rendering in the browser then id "drag_1-drag-drop-area" is not getting render.
Normal behaviour,

Missing when rendered from webdynpro,

Thanks,
Jyoti
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.