New Window in NG Desktop Client

Forum to discuss the new web client version of Servoy.

New Window in NG Desktop Client

Postby dev-ws-011 » Fri Aug 30, 2019 3:27 pm

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
Servoy Developer
dev-ws-011
 
Posts: 21
Joined: Fri Oct 21, 2016 8:23 am

Re: New Window in NG Desktop Client

Postby omar » Fri Sep 06, 2019 9:57 am

Sorry, I previously answered your question with the NG Client in mind, have not played with the new NG Desktop client yet.
Intrasoft, Founder
Omar van Galen
omar@intrasoft.nl
+31-(0)6-21234586
Servoy Developer
omar
 
Posts: 334
Joined: Sat Feb 12, 2011 4:51 pm
Location: Intrasoft, The Netherlands

Re: New Window in NG Desktop Client

Postby dev-ws-011 » Fri Sep 06, 2019 12:55 pm

Hi Omar,

omar wrote: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
Servoy Developer
dev-ws-011
 
Posts: 21
Joined: Fri Oct 21, 2016 8:23 am

Re: New Window in NG Desktop Client

Postby omar » Fri Sep 06, 2019 1:19 pm

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:
Code: Select all
forms.formName.openNonModal()


Code: Select all
/**
* 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.
Intrasoft, Founder
Omar van Galen
omar@intrasoft.nl
+31-(0)6-21234586
Servoy Developer
omar
 
Posts: 334
Joined: Sat Feb 12, 2011 4:51 pm
Location: Intrasoft, The Netherlands

Re: New Window in NG Desktop Client

Postby dev-ws-011 » Wed Sep 11, 2019 9:07 am

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.
Servoy Developer
dev-ws-011
 
Posts: 21
Joined: Fri Oct 21, 2016 8:23 am

Re: New Window in NG Desktop Client

Postby sean » Wed Sep 11, 2019 5:18 pm

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
Software Engineer
Servoy USA
sean
 
Posts: 172
Joined: Mon May 21, 2007 6:26 pm
Location: USA


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 1 guest

cron