Nevermind. Solved it :)

It was described in the
FAQ<http://code.google.com/webtoolkit/doc/1.6/FAQ_Client.html#Why_doesn't_the_bridge_call_to_my_JSNI_method_work_in_onclick>
.

On Tue, May 18, 2010 at 9:30 AM, bftanase <bftan...@gmail.com> wrote:

> 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){
>
> th...@org.makita.receivinginspection.client.mainentrypointtest
> ::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 google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to