Hey guys. Can someone take a look at this small PoC and let me know
what am I doing wrong?

package org.makita.receivinginspection.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.RootPanel;

public class MainEntryPointTest implements EntryPoint{

  public void onModuleLoad() {
    createJSFunction();
    HTML html = new HTML("<a href='#' onclick='editTest(1)'> Click me
</a>");
    RootPanel.get().add(html);
  }

  public void openEditWindow(int testId){
    com.google.gwt.user.client.Window.alert("Test id: " + testId);
  }

  public native void createJSFunction()/*-{
    $wnd.editTest = function(testId){
 
[email protected]::openEditWindow(I)
(testId);
      return false;
   }
  }-*/;

I get a JS error: uncaught exception: java.lang.ClassCastException. I
believe it has something to do with some cast... but where? I also
tried the openEditWindow method without parameters and still the same :
(

Thanks!

}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to