is plugins.file.showDirectorySelectDialog web compatible

Forum to discuss the Web client version of Servoy.

is plugins.file.showDirectorySelectDialog web compatible

Postby antonio » Tue May 17, 2011 4:53 am

Is plugins.file.showDirectorySelectDialog web compatible?
I can get this to work in WC and SC in developer, but only in SC in production. The Directory Select Dialog doesn't appear in WC.
I want to read contents of a folder on a CD on the client's machine.

Code: Select all
   if (globals.isMac())
   {
      var folder = plugins.file.showDirectorySelectDialog('/Volumes/');
   }
   else {
      var folder = plugins.file.showDirectorySelectDialog();
   }
Tony
Servoy Developer Version 5.2.16
Developer MAC OSX 10.8.4 Java version 1.6.0_51
Production Debian Linux Java version 1.6.0_29
antonio
 
Posts: 622
Joined: Sun Apr 02, 2006 2:14 am
Location: Australia

Re: is plugins.file.showDirectorySelectDialog web compatible

Postby jcompagner » Tue May 17, 2011 9:22 am

in the web you can't select a directory on the client, so no that dialog is not web compatible.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8096
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: is plugins.file.showDirectorySelectDialog web compatible

Postby antonio » Tue May 17, 2011 10:30 am

Thanks Johan, I was hopeful when I found that it works in WC in developer, but there client and server are on the same machine.

Can you suggest a way to achieve this? I want the client to be able to point to a folder on a CD so we can programmatically move some files to the server.

The Wiki suggests that this is a current limitation. Does that mean it might be possible in the future?
http://wiki.servoy.com/display/public/DOCS/file
The showXxxxDialog(...) functions, when used in the Web Client, have certain limitations due to being operated in a browser. Browser security (currently) limits interaction with the local file system, except for single file select operations initiated by the user clicking a button.
Tony
Servoy Developer Version 5.2.16
Developer MAC OSX 10.8.4 Java version 1.6.0_51
Production Debian Linux Java version 1.6.0_29
antonio
 
Posts: 622
Joined: Sun Apr 02, 2006 2:14 am
Location: Australia

Re: is plugins.file.showDirectorySelectDialog web compatible

Postby jcompagner » Tue May 17, 2011 10:34 am

no that is also not possible in the future..
A user can only one file and only the file itself, you can't select a directory on he client and then upload all the files in that dir to the server.
Thats impossible,, we don't have access to that dir. If you want these kind of things use the smart client
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8096
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: is plugins.file.showDirectorySelectDialog web compatible

Postby pbakker » Tue May 17, 2011 1:09 pm

To elaborate on Johan's comment: It's a restriction of browsers, not one that we apply to the Web Client.

Maybe such a thing will be possible in browsers in the future, but for not browsers just restrict it. The standard bodies that govern the web are looking into a File API in browsers, so maybe the future holds something nice.

Paul
pbakker
 
Posts: 2821
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: is plugins.file.showDirectorySelectDialog web compatible

Postby antonio » Tue May 17, 2011 1:27 pm

Thanks Paul and Johan, I understand that this is not a Servoy limitation. I was merely hopeful. I will work with SC for this function.
Tony
Servoy Developer Version 5.2.16
Developer MAC OSX 10.8.4 Java version 1.6.0_51
Production Debian Linux Java version 1.6.0_29
antonio
 
Posts: 622
Joined: Sun Apr 02, 2006 2:14 am
Location: Australia


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 2 guests

cron