-1

I'm trying to open a new window with a specific content e.g. it is displaying another view that i've created. The opened window/popup/dialog has to always on top and draggable. While it is on top I want to edit and work on the background window. Is this possible? If it is, how can I let the opened window/popup/dialog display another view or add some conent to it?

I've tried to open a new window with a simple js function window.open(), but I cannot let it be on top and edit some background window content. Maybe there are other ways to do so? Maybe some UI5 methods will accomplish what I'm looking for?

Gizger
  • 1
  • 1

2 Answers2

0

I am sorry to say, but there is no standard way to do so.

Windows are managed by your browser, so you can open it in a new window, but it is not part of the initial application if you do so. If you want to use windows you could open a new app in the new window. here is a post on how the communication between those apps can work: Communication between tabs or windows

Popovers allow you to access the rest of the app while they are open, but once you do the popover closes. There is a property, that stops it from closing, but this property also blocks the wished for interaction. (the property is named modal check here: https://ui5.sap.com/#/api/sap.m.Popover/) Like every UI5 Element it can be made draggable, refer to https://ui5.sap.com/#/api/sap.ui.core.dnd.DragDropBase.

Dialogs do not allow any interaction with the rest of the app and i did not find a way to bypass it. Its has a build in feature for drag and drop though.

However

If you can do without the draggable part there is a way you can make it kind of work. It will only work as intended on desktops or large enough tablets.

You can use the FlexibleCollumnLayout and open your content in a new column. That allows you to interact with the "Dialog" Content at the same time as the content of you main page. Like this the "Dialog" will always be to the side, so it is not draggable.

If you really want to have the draggable part you would have to create a custom control. Read up on the topic here: https://ui5.sap.com/#/topic/8dcab0011d274051808f959800cabf9f

I hope I could help you, Eric

Erch
  • 589
  • 5
  • 25
-1

Thanks for you answer, but I found a solution in the meantime with this help: https://github.com/SAP/openui5/issues/1022

By setting oDialog.oPopup.setModal(false); it is able to even set a sap.m.Dialog non-modal. Then I set draggable: true resizable: true and gave it a styleclass with a very high z-Index and got exactly what I was looking for. A non-modal sap.m.Dialog, that is draggable and always on top of everything while the background can still be edited.

Gizger
  • 1
  • 1
  • 1
    your question states clearly "window". You solution is talking about a popup... this entire question answer is miss-leading for everyone. – Benedikt Kromer Sep 17 '19 at 11:19