I am a little confused about which version of the plugin to use:
I am developing a NGClient solution. That said I want have users choose either the NgClient browser approach or the NgDesktop approach.
I have been through all the documentation and the webinars relating (that I could find in Servoy).
My main issue at the moment is which method to use in which case:
plugins.file.showFileOpenDialog
or
plugins.ngdesktopfile.showOpenDialog
I assumed that I could use the application.getApplicationType() but it only returns APPLICATION_TYPES.NG_CLIENT( which I guess is intentional).
My higher level objective is to send an email with a file attached - hence the selection of a file dialog.
Should I be ONLY using the plugins.file.showFileOpenDialog (which I have tested for file selection and it works in both cases)? This usage will popup a dialog where the file is selected and then the user must invoke the upload.
For the NgDesktop the email file attachment is on their own desktop (local file system).
{Apologies for the naivete of the question - still learning…}.
Tom
The ngdesktopfile plugin will only work when you use NGDesktop.
In order to test if the NG client type application runs from NGDesktop, you have to install the ngdesktoputils plugin and use the function isNGDesktop()
The ‘showFileOpenDialog’ might not be the best example to illustrate the difference.
But bottomline, a client running from the NGDesktop is able to work directly with the local filesystem (including mapped drives, shares, etc.)
This enables you to read/write files directly without users having to download and open files.
BUT… as you mentioned you will be able to run from browser as well, you either have to develop 2 flows, or just stick to the possibilities of the ‘old’ java file plugin (plugins.file)
Thanks Marc,
I did not see that utility method.
I find that is an obscure place to hold that information. I would have thought it would be a sub-state of the NGClient application type.
Yes I already have two flows at certain points like file select dialogs (now wouldn’t it smart to combine the check for isNgDesktop within the showFIleOpen dialog?)
I have another issue with the returned file name - different in each case - but I will put that into the Jira system. Jira
pitc:
I find that is an obscure place to hold that information. I would have thought it would be a sub-state of the NGClient application type.
Not really, the application type is still NGClient.
You should see NGDesktop as being your type of browser, in this case a special one including NodeJS extensions