GWT JSNI javascript to Java not working
问题 I am trying to invoke a Java Method from my Javascript code. This is for a Windows Phone 7 app using Phonegap. I have the following in my javascript code. document.addEventListener("backbutton", onBackKeyDown, false); function onBackKeyDown(){ } And in my Java code I have the following. public static native void exportStaticMethod() /*-{ $wnd.onBackKeyDown = $entry(this.@com.mycompany.myapp.client.MyApp::hideSettingsWidgets()); }-*/; Then in the on onModuleLoad() I am calling it like so: