Hello,
I'm trying to achieve something similar to http://www.vectomatic.org/libs/lib-gwt-file, ie using HTML5 File API to upload a file with drag and drop from the desktop. Custom events handlers are attached to GWT components using addBitlessDomHandler to handle the drag and drop events.
I want to avoid mixing GWT components and SmartGWT components but I can't get the addBitlessDomHandler method to work for drag and drop events on SmartGWT components. It works on a GWT SimplePanel.
Here is simplified example:
I don't want to use a FileUpload item because the current UI has a button that open a dialog with the upload form and I want to drop the file on that button.
I'm using 3.1p tested with Chromium 25 and FF 19.0.2.
Thanks for you help,
Youri
I'm trying to achieve something similar to http://www.vectomatic.org/libs/lib-gwt-file, ie using HTML5 File API to upload a file with drag and drop from the desktop. Custom events handlers are attached to GWT components using addBitlessDomHandler to handle the drag and drop events.
I want to avoid mixing GWT components and SmartGWT components but I can't get the addBitlessDomHandler method to work for drag and drop events on SmartGWT components. It works on a GWT SimplePanel.
Here is simplified example:
Code:
public class TestPortal implements EntryPoint { public void onModuleLoad() { VLayout rootLayout = new VLayout(); ToolStrip toolStrip = new ToolStrip(); ToolStripButton button = new ToolStripButton("Hello very long text to fill space"); button.addBitlessDomHandler(new DragEnterHandler() { @Override public void onDragEnter(DragEnterEvent event) { System.out.println("drag enter " + event); } }, DragEnterEvent.getType()); toolStrip.addButton(button); rootLayout.draw(); } }
I'm using 3.1p tested with Chromium 25 and FF 19.0.2.
Thanks for you help,
Youri
Comment