plugins.file vs plugins.ngdesktopfile

Forum to discuss the new web client version of Servoy.

plugins.file vs plugins.ngdesktopfile

Postby pitc » Thu Dec 10, 2020 3:01 am

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:
Code: Select all
plugins.file.showFileOpenDialog

or
Code: Select all
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
Tom
prospect-saas.com
pitc
 
Posts: 115
Joined: Thu Nov 14, 2019 2:22 pm
Location: Ottawa, Ontario, Canada

Re: plugins.file vs plugins.ngdesktopfile

Postby mboegem » Thu Dec 10, 2020 3:35 am

Hi Tom,

plugins.ngdesktopfile.showOpenDialog

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)

Hope this helps
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1749
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: plugins.file vs plugins.ngdesktopfile

Postby pitc » Thu Dec 10, 2020 5:01 pm

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. https://support.servoy.com/browse/SVY-15692
Tom
prospect-saas.com
pitc
 
Posts: 115
Joined: Thu Nov 14, 2019 2:22 pm
Location: Ottawa, Ontario, Canada

Re: plugins.file vs plugins.ngdesktopfile

Postby mboegem » Fri Dec 11, 2020 12:28 pm

pitc wrote: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
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1749
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 7 guests