plugins.file.showFileOpenDialog pre-set file name possible?

Questions and answers on developing, deploying and using plugins and JavaBeans

plugins.file.showFileOpenDialog pre-set file name possible?

Postby Bernd.N » Thu Nov 12, 2015 12:31 pm

plugins.file.showFileOpenDialog(selectionMode,startDirectory,multiselect,filter,callbackfunction,title) has a lot of options, but is there a way to pre-set a file name, when you want to suggest a file name for a new file?

That would be handy in the common scenario where users need to create a file name for Excel export, and we want to suggest a temporary file name that contains the subject, the date and the time including seconds, so that the user gets unique file names for his exports.
Bernd Korthaus
LinkedIn
Servoy 7.4.9 SC postgreSQL 9.4.11 Windows 10 Pro
User avatar
Bernd.N
 
Posts: 544
Joined: Mon Oct 21, 2013 5:57 pm
Location: Langenhorn, North Friesland, Germany

Re: plugins.file.showFileOpenDialog pre-set file name possib

Postby kkiani » Thu Nov 12, 2015 4:32 pm

Hi Bernd,
you can try plugins.file.showFileSaveDialog(fileNameDir) instead of showFileOpenDialog(..)
It shows File Save dialog along with the file name which you provide as parameter.
kkiani
 
Posts: 1
Joined: Tue Oct 20, 2015 3:50 pm

That works

Postby Bernd.N » Thu Nov 12, 2015 6:16 pm

Thank you, that is exactly what I was looking for. :)
Bernd Korthaus
LinkedIn
Servoy 7.4.9 SC postgreSQL 9.4.11 Windows 10 Pro
User avatar
Bernd.N
 
Posts: 544
Joined: Mon Oct 21, 2013 5:57 pm
Location: Langenhorn, North Friesland, Germany


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 3 guests