karolsojko
karolsojko

Reputation: 721

How to load a file in GWT on the client side?

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 ?

Upvotes: 2

Views: 2429

Answers (2)

Igor Klimer
Igor Klimer

Reputation: 15331

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.

Upvotes: 1

TomHastjarjanto
TomHastjarjanto

Reputation: 5408

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.

Upvotes: 1

Related Questions