on 03-14-2015 5:25 PM
Hi,
I'm using sap.m.UploadCollection to upload documents. It all works fine. File's being uploaded, and they are shown in the list.
When I click on the link in the list the file is downloaded again. The only issue is this;
When I click on a text file, an image file or a PDF file, it opens in the same browser window. Is there a way to open the link from sap.m.UploadCollection in a new browser window?
For an example I refer to the example in the SAPui5 SDK - Demokit:
https://sapui5.hana.ondemand.com/sdk/explored.html#/sample/sap.m.sample.UploadCollection/preview
If you click on a text-file or pdf-file you'll see it will open in the same browser window.
with regards,
Michael Visser
interesting, in 1.26.6 it is
oFileNameLabel = new sap.m.Link(sItemId + "-ta_filenameHL", {
text : sFileNameLong,
enabled : bEnabled,
href : oItem.getUrl()
}).addStyleClass("sapMUCFileName");
and in 1.28.1 it is
oFileNameLabel = new sap.m.Link(sItemId + "-ta_filenameHL", {
text : sFileNameLong,
enabled : bEnabled,
target : "_blank",
href : oItem.getUrl()
}).addStyleClass("sapMUCFileName");
so, while you are not on 1.28 you can do a trick
oUploadCollection.addDelegate({
onAfterRendering: function () {
$( ".sapMUCFileName" ).attr("target", "_blank");
}
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.