tags:

views:

98

answers:

2

I'm kind of new to GWT and I'm looking how to make a menu in my client app like File->Open .. that will actualy open an text file and let me edit it in some widget ? Is there a way to load files like that ?

+1  A: 

You can add this functionality by having an upload dialog using a regular file input type and pointing the file-> open button to an event which causes the "browse" button part of that input type to trigger.

Tomh
the upload dialog comes with the standard gwt or is it with smart gwt ?
Zoja
+1  A: 

FileUpload is a GWT widget that wraps the HTML <input type='file'> element. So, just as <input type='file'>, it uses the operating system's open/save dialog.

Igor Klimer
and if I want the file to be stored locally not uploaded to server ?
Zoja
Good question :D One way would be to send it to the server and then retrieve it back via RequestBuilder - but that's just stupid/wasteful. You should post a new question regarding this - I'm sure someone will be able to help :)
Igor Klimer