In my application I used the following code to select a path to write a .xls file.
var _path = plugins.file.showFileSaveDialog();
Through the smart client(Developer) and smart client(Server), this gives the File Save Dialogue
box to select the ‘_path’ and writes the .xls file.
But when I run this through Web Client (Developer) and Web Client (Server) this does not show the
File Save Dialogue box to select the path. Then the method is terminated.
If I hard code the path instead of using plugins.file.showFileSaveDialog() then it writes the .xls file
through any of the above ways.
var _path = ‘…’;
It shows that method I’m using is correct.
How can I make this work in the Web Client (Developer) and Web Client (Server)?
Regards
Chamil
Hi Chamil
var vInstallDir = java.lang.System.getProperty("user.dir")
This will give you the Servoy install director on the Server computer - you can then setup a sub-directory to save files to and modify the result of vInstallDir as required.
Browsers do not support a file save dialog to be called from within the page, so unfortunatly, we cannot support a filesave dalog in the WebClient.
Paul
Hi Graham,
Yes I tried with this.
var vInstallDir = java.lang.System.getProperty(“user.dir”)
After modifying the vInstallDir can save the file in a sub directory.
Then is there a way to open/download that saved file through the Web Client?
Regards
Chamil.
If you save the file in the webserver (…/server/webapps/root/xxx.yyy), it’s accessible through the webserver on http://mydomain:port/xxx.yyy
Paul