Clearing cache of fileupload widget.

837 views
Skip to first unread message

Rahul Sharma

unread,
Dec 22, 2011, 12:59:36 AM12/22/11
to Google Web Toolkit
Hi,
Can anyone help me out in clearing the contents of the fileupload
widget.
I mean for textbox we write textBox.setText("") to clear the content
of it, is there anyway to clear the FIleupload also.

Thanks in Advance
rahul

Thomas Broyer

unread,
Dec 22, 2011, 5:12:57 AM12/22/11
to google-we...@googlegroups.com
The only way to clear an <input type=file> (or FileUpload widget in GWT) is to reset() the enclosing form (FormPanel). If that's not possible, then you'll have to replace the FileUpload with a newly created one (this is what I did years ago, works great)
Reply all
Reply to author
Forward
0 new messages