cancel
Showing results for 
Search instead for 
Did you mean: 

SAP UI5 UploadCollection - pending

Former Member
0 Kudos

UploadCollection (pending) control does not refresh and remove the icon and upload entry even after successful remove of the item. For example: an item has been added to teh list using hte + icon. It is entered into the upload list for uploading later but before the upload is done the user decides to leaves the page. I can force the user to manually delete the entries using the code below but would prefer to just remove the items and leave the screen. The removeItem code does the trick because when I do a getItems immedialey after removeitem the entry has been removed, the object list is empty. However, the entry/picture/icon name of file and delete icon are still showing on the screen when I come back to the page at a later stage. How can I come back to this page with a fresh start.

if (this.byId("UploadCollection").getItems().length > 0) {
MessageToast.show("Please remove attachments before navigating back");
return;
}

for (var i = 0; i < oUploadCollection.getItems().length; i++) {
oUploadCollection.removeItem(oUploadCollection.getItems()[i]);
}

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Solved by submitter of the question - solution was to install the latest version of SAP WebIde. The older version I was on was causing the problem.