Opening the http link in the shell itself, and not in a new window in sapui5

The ui5 command line has workspace items in the shell. I gave the http link in the setContent method of one of the work items. This link opens, but in a new window, and not inside the shell. But I want to open this link inside the shell.

How to do it...???

+3
source share
1 answer

I had the same problem and solved it with an HTML control which was the contents of the Shell Worksetitem and used as an iframe:

var iframe = new sap.ui.core.HTML({
        content : "<iframe src='yourAddress'>"
    });

If you intend to create a new tab in your shell that displays the contents, you can add a new WorkSetItem to the press listener of your link, for example:

var link = new sap.ui.commons.Link({
        press : function() {
            shell.addWorksetItem(...);
        }
    });

Perhaps this also works for you.

+3
source

All Articles