Question

I read this question. I need to do a clipboard system in my gwt web application.

ZeroClipboard there is no longer on GoogleCode, and i have downloaded it from GitHub, but this guide doesn't work. Any one can help me?

This is my situation:

Home.html (in the same directory i have ZeroClipboard.js and ZeroClipboard.swf)

<script type="text/javascript" src="ZeroClipboard.js"></script>

MyPage.java

   -
   -
   -
    final Anchor copy = new Anchor("Copy");
    copy.getElement().setId("copyId");
    glueCopy("Hello World");
    add(copy);

  }

 public static native void glueCopy(String text) /*-{
  var clip = new $wnd.ZeroClipboard.Client();
  clip.setText(text);
  clip.glue('copyId');
}-*/;

Nothing happen when i click the anchor.

Was it helpful?

Solution

i have resolved the problem my self. Flash security policy doesn't permit the execute from localhost.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top