Is it possible to use window.open to open a sapui5 application?

6.6k Views Asked by At

I have this sapui5 application with a button, which when pressed has the following function.

onWindowOpen: function(oEvent) {
    window.open("http://www.google.com", "_blank", "toolbar=yes,scrollbars=yes,resizable=yes,top=100,left=500,width=800,height=400");
}

My question is, if it's possible to open some ui5 page in the window in this manner? Thanks :)

2

There are 2 best solutions below

0
On

Yes, its possible. I locally ran two UI5 applications and I could open another UI5 application in a new tab from one UI5 application with window.open. However, context passing would be a challenge as you will need to associate your data with window object which is global.

0
On

Yes, it is possible to open a ui5 page with window.open.

Technically a UI5 Application is a single page Web app that you can link to like any other Web page. However, if you would like to link to a certain subpage of your app or pass in parameters, you could just adapt your url to the wanted routing pattern. The hash value is then interpreted by the app itself and the corresponding page will be displayed.

You can have a look into this routing tutorial: https://sapui5.hana.ondemand.com/#docs/guide/1b6dcd39a6a74f528b27ddb22f15af0d.html