You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UploadIFrameOnloadStrategy.java 604B

12345678910111213141516171819202122232425
  1. /*
  2. @VaadinApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.terminal.gwt.client.ui;
  5. public class UploadIFrameOnloadStrategy {
  6. native void hookEvents(com.google.gwt.dom.client.Element iframe,
  7. VUpload upload)
  8. /*-{
  9. iframe.onload = function() {
  10. upload.@com.vaadin.terminal.gwt.client.ui.VUpload::onSubmitComplete()();
  11. };
  12. }-*/;
  13. /**
  14. * @param iframe
  15. * the iframe whose onLoad event is to be cleaned
  16. */
  17. native void unHookEvents(com.google.gwt.dom.client.Element iframe)
  18. /*-{
  19. iframe.onload = null;
  20. }-*/;
  21. }