Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
How to invoke Upload from File Open MenuItem?
How can I invoke the Upload widget from a MenuItem?
The Basic MenuBar demo shows how to capture the "File Open" menu item action. The Single-Click Upload demo shows how to pop up a file selection dialog. I would like the menu item action to pop up the file selection dialog. So far I have only been able to accomplish this through a two step process: the file-open menu item pops up the Upload widget, then the user needs to click the "select file" button on the widget. I would like the "select file" button to be invoked immediately through the File-Open menu action.
Your main problem will be the same is in http://dev.vaadin.com/ticket/7197 - browsers prevent opening the file dialog from XHR responses.
Thank-you for the response. It was really starting to look non-trivial to do this. My conclusion is that I can't really use a MenuBar to perform a "File - Open" operation. I have to consider laying out the widgets in some other manner.