cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

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.

scriptfiledragoriginal.txt

View Entire Topic
a_figueredo
Explorer
0 Likes

Hi Jyoti,

Were you able to solve the issue?

We have some webdynpros with flash upload (for multiple file upload) and we would need to update them, as flash support will end this year for IE, Chrome and other browsers..

Your approach looks fine, other option is using htmlisland + other free javascript.

Thanks a lot,

Kr,

Agustín.