laaglu / lib-gwt-file Goto Github PK
View Code? Open in Web Editor NEWA GWT encapsulation of the W3C File API
Home Page: http://www.vectomatic.org/libs/lib-gwt-file
A GWT encapsulation of the W3C File API
Home Page: http://www.vectomatic.org/libs/lib-gwt-file
I use the following structure of panels:
flowPanel = new FlowPanel();
focusPanel = new FocusPanel();
focusPanel.addStyleName(resources.css().focusPanel());
fileInput = new FileUploadExt();
dropPanel = new DropPanel();
dropPanel.addStyleName(resources.css().dropPanel());
testPanel = new FlowPanel();
dropPanel.add(testPanel);
fileInput.addStyleName(resources.css().fileUpload());
flowPanel.add(fileInput);
flowPanel.add(focusPanel);
focusPanel.add(dropPanel);
initWidget(flowPanel);
When I enter the dropPanel with the mouse the DragEnterEvent is fired. When I leave it the DragLeaveEvent is fired. This is correct.
The problem is that when the mouse drags over the testPanel which is inside the dropPanel the DragLeaveEvent is fired. I think this is might be because the FlowPanel does not forward the DragOverEvent.
Do you see any way to handle this?
What is the difference between the LoadEvent and the LoadEndEvent? Both seem to make the same.
Hello,
first off, I wanted to say that your lib is working perfectly so far. I can load images and display them. Now I would also like to upload it to my server. Is there a way to get the byte[] data from the image?
Thanks and regards,
Dustin
Placing File#create\revokeObjectURL methods to File object without even making it static is heavy architecture fail. IMHO, better to create some "FileUtil" ("UrlUtil") class with helpers.
Also webkit doesn't have " window.URL"
try this JS
window.URL = window.URL || window.webkitURL;
Hi there,
When I try to read an image file in IE11, it fails with this error:
Object doesn't support property or method 'readAsBinaryString'.
Thanks,
gxtuser
Fatal error when creating a DropPanel in IE 9. While I don't expect it to work, it would be nice to degrade gracefully..
00:01:53.490 [ERROR] Failed to create an instance of 'org.vectomatic.dnd.DropPanel' via deferred binding
com.google.gwt.core.client.JavaScriptException: (TypeError) @org.vectomatic.dnd.DropPanel::setup(Lcom/google/gwt/dom/client/Element;)([JavaScript object(14555)]): Object doesn't support this property or method at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:299) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107) at org.vectomatic.dnd.DropPanel.setup(DropPanel.java) at org.vectomatic.dnd.DropPanel.(DropPanel.java:81) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:475) at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49) at com.google.gwt.core.shared.GWT.create(GWT.java:57) at com.google.gwt.core.client.GWT.create(GWT.java:85) at com.spotmouth.gwt.client.PlateSearchComposite_MyUiBinderImpl$Widgets.build_dropPanel(PlateSearchComposite_MyUiBinderImpl.java:829) at com.spotmouth.gwt.client.PlateSearchComposite_MyUiBinderImpl$Widgets.get_dropPanel(PlateSearchComposite_MyUiBinderImpl.java:825) at com.spotmouth.gwt.client.PlateSearchComposite_MyUiBinderImpl$Widgets.build_f_HTMLPanel1(PlateSearchComposite_MyUiBinderImpl.java:214) at com.spotmouth.gwt.client.PlateSearchComposite_MyUiBinderImpl$Widgets.get_f_HTMLPanel1(PlateSearchComposite_MyUiBinderImpl.java:168) at com.spotmouth.gwt.client.PlateSearchComposite_MyUiBinderImpl$Widgets.access$1(PlateSearchComposite_MyUiBinderImpl.java:167) at com.spotmouth.gwt.client.PlateSearchComposite_MyUiBinderImpl.createAndBindUi(PlateSearchComposite_MyUiBinderImpl.java:39) at com.spotmouth.gwt.client.PlateSearchComposite_MyUiBinderImpl.createAndBindUi(PlateSearchComposite_MyUiBinderImpl.java:1) at com.spotmouth.gwt.client.PlateSearchComposite.(PlateSearchComposite.java:138) at com.spotmouth.gwt.client.PlateSearchPanel.(PlateSearchPanel.java:78) at com.spotmouth.gwt.client.MyWebApp.toggleMarkPlate(MyWebApp.java:3862) at com.spotmouth.gwt.client.MyWebApp.process(MyWebApp.java:2458) at com.spotmouth.gwt.client.MyWebApp.access$24(MyWebApp.java:2383) at com.spotmouth.gwt.client.MyWebApp$51.onValueChange(MyWebApp.java:2335) at com.google.gwt.event.logical.shared.ValueChangeEvent.dispatch(ValueChangeEvent.java:128) at com.google.gwt.event.logical.shared.ValueChangeEvent.dispatch(ValueChangeEvent.java:1) at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1) at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40) at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193) at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88) at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127) at com.google.gwt.user.client.impl.HistoryImpl.fireEvent(HistoryImpl.java:80) at com.google.gwt.event.logical.shared.ValueChangeEvent.fire(ValueChangeEvent.java:43) at com.google.gwt.user.client.impl.HistoryImpl.fireHistoryChangedImpl(HistoryImpl.java:87) at com.google.gwt.user.client.impl.HistoryImpl.newItem(HistoryImpl.java:131) at com.google.gwt.user.client.History.newItem(History.java:179) at com.google.gwt.user.client.History.newItem(History.java:164) at com.google.gwt.user.client.ui.Hyperlink.onBrowserEvent(Hyperlink.java:285) at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1351) at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1307) at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242) at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at java.lang.Thread.run(Thread.java:680)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.