Skip to Content
avatar image
Former Member

SAP UI5 UploadCollection - pending

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]);
}

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Oct 12, 2016 at 11:19 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded