New Window in NG Desktop Client

Hi,

I am looking to create multiple floating windows(JSWindow) from main application in NG Desktop client, which are active at same time i.e not modal window or dialog.

Any assistance in achieving above will be highly appreciated.

Thanks

Sorry, I previously answered your question with the NG Client in mind, have not played with the new NG Desktop client yet.

Hi Omar,

omar:
Sorry, I previously answered your question with the NG Client in mind, have not played with the new NG Desktop client yet.

Thanks for your response.

Actually, I want new floating window as complete window(which can be minimized, maximized) just like we have in Smart Client, where we can navigate easily from taskbar between different windows.

If there is any suggestion or workaround to achieve this, please share as it will be appreciable.

Thanks

In the normal NG Client this is not hard to do. Best resource to learn how is this video by Sean: https://www.youtube.com/watch?v=ivD5WoxFtdM&t=529s.

In short you can achieve what you want by adding the function below to any form and call it like this: ```
forms.formName.openNonModal()


/**

  • Open the form as a non-modal dialog and load the data that was passed in

  • @public

  • @param {JSFoundSet} [fs]

  • @properties={typeid:24,uuid:“43723D28-6545-4475-BAE3-FF7A6781D6E2”}
    */
    function openNonModal(fs) {
    // foundset to work on
    if (fs) {
    loadFoundSet(fs)
    }

    // Open as a non-modal form
    var win = application.getWindow(controller.getName())
    if (!win) {
    win = application.createWindow(controller.getName(), JSWindow.DIALOG)
    }
    win.resizable = true
    win.undecorated = false
    win.show(this)
    }


By active at the same time I assume you mean that each one can get the focus depending on which one you interact with? If you want more controle on where they are placed and how they behave you can also place them as subforms on a containing form. However, NG Client is a web-based application so it will not give multiple windows on the taskbar. That is exactly what the new NG Desktop Client (which is probably based on Electron) should be able to do if I am not mistaken.

Hi Omar,

Glad to have some workarounds shared, but unfortunately this is not creating another proper window (i.e. having minimize, maximize and close buttons).

  1. it updates same window if we use JSWindow.WINDOW
  2. it creates just dialog popup if we use JSWindow.DIALOG.

I am looking to create multiple floating windows(JSWindow) from main application in NG Desktop client.

Thanks in advance.

Hi dev-ws-011

Thanks for your interest in the NGDesktop project!
Thanks Omar for the reference to webinars!

At present, we don’t support multi-native-windowing within the same application in the NGDesktop

This is because each native window is its own separate client session. Therefore, it is possible to have multiple windows, the wouldn’t be directly connected via scripting APIs.
However, this could be achieved using broadcasting between clients and a bit of clever coding.

There’s a nice demo of that in this webinat.

Hope this helps.
Sean