Hi everybody,
I would like to add a new feature to my solution: being able to drag files/folders from Windows Explorer to drop them into the table view of the form.
The solution would get the information from the file to print them in the list (name, type, size, etc…) and the file would be transferred to a specific directory of the server.
I have looked on the forum and Googled it, but I didn’t find anything relevant for Servoy. I was thinking about creating my list in Java with its listeners and plug it in Servoy but I’m not really sure if It will work: will the listener still listen when the list will be integrated to the form? Will the information passed form the Java object be compatible with javascript?
I don’t to start developing it if I’m not sure that it’s possible. ![Laughing :lol:]()
In Servoy 4.1 there is not an automatic support for drag and drop. Drag and drop features will be added in 4.2 but it will still be within Servoy (as far as I know). However Java has support for drag and drop from a file manager, for example. This means you would have to build this functionality in a bean and use it within Servoy. At first search I found this link that may help: http://oreilly.com/catalog/jswing/chapter/dnd.beta.pdf
if this is still needed, I have found a way to do this with a plug-in (tested in 3.5 only). let me know if interested.
Maybe you could use the DnDFileBean: http://www.servoy-stuff.net/dnd_file.php
It doesn’t work in Table view, but you could use it in form view and populate a dataSource with the retrieved Files, which could be shown within a tabpanel using a form in Table view, this should achieve what you want to do, shouldn’t it?
Exactly how I use your plug-in indeed:
- I don’t show the drag and drop area, I use the dropped files list to generate records immédiately, filtering the non desired extensions or hidden files: and in a tab panel, I show the records thus created in table view. As my tab panel has other tabs, the triggered script also brings the right tab panel on top to show dropped files immediately with the details I need and thus replaces the drag n drop area which only shows names. It is of course a lilttle slower, but very acceptable.
I then use this list for further actions, ie zip and “ftp put” to upload on a server in my case, though this will be replaced by the it2be datastream plug-in in the final version (if any!).
lesouef:
if this is still needed, I have found a way to do this with a plug-in (tested in 3.5 only). let me know if interested.
Actually before ptalbot released his DnDFileBean I developed a simple one for what we need to do.