Can't get file list

39 views
Skip to first unread message

Odili Charles

unread,
May 3, 2013, 2:27:15 AM5/3/13
to lib-gw...@googlegroups.com
Hi all, I am using the 0.3.3 version of this library in my GWT (2.4) project but am having a hard time with the API;
Within the onDrop() method of a DropHandler, the call to event.getDataTransfer()..getFiles().iterator() refuses (compiler error) because there appear not to be a .getFiles() method from the returned DataTransfer object.
So, am wondering how to obtain a list of the files dragged into the DropPanel. I need to allow the user drag a list of files into the DropPanel and upload them. Kindly assist.

Ericsson de Oliveira

unread,
May 3, 2013, 7:25:19 AM5/3/13
to lib-gw...@googlegroups.com
Hello,
you have to use this line inside the onDrop method:

FileList list = event.getDataTransfer().<DataTransferExt>cast().getFiles();


This way you have all the files dropped and their respectives names.

Odili Charles

unread,
May 3, 2013, 12:36:09 PM5/3/13
to lib-gw...@googlegroups.com
Thanks, will give it a try.


--
You received this message because you are subscribed to a topic in the Google Groups "lib-gwt-file" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lib-gwt-file/CgT5Z8Nd8LE/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to lib-gwt-file...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Charles Opute Odili
ICTU - Web Unit,
University of Benin.

eBanking Prototype : http://goo.gl/IfnAJ
Reply all
Reply to author
Forward
0 new messages