Hi all, I am trying to do $Subject.
When the JavaScript method is in the <head> of html file itself I can call the method from module load as a native method using JSN [1]I. But when i refer to the js file from html page [2] and put the method in to the js file i get the following gwt error[3]. Has anyone ever attempted anything similar and achieved it successfully? [1] in java class public static native void gwtjsPlumbDemo() /*-{ $wnd.gwtjsplumbdemo(); }-*/; [2] in gwtjsplumbdemo.js file function gwtjsplumbdemo() { alert("Success!!!"); } in html <script type="text/javascript" language="javascript" src="gwtjsplumbdemo.js"></script> [2] [115:32:19.737 [ERROR] [gwtjsplumb] Unable to load module entry point class com.wso2.codenvy.client.GWTJsplumb (see associated exception for details) com.google.gwt.core.client.JavaScriptException: (TypeError) @com.wso2.codenvy.client.GWTJsplumb::gwtjsPlumbDemo()([]): Object doesn't support property or method 'gwtjsplumbdemo' at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:304) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107) at com.wso2.codenvy.client.GWTJsplumb.gwtjsPlumbDemo(GWTJsplumb.java) at com.wso2.codenvy.client.GWTJsplumb.onModuleLoad(GWTJsplumb.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:411) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at java.lang.Thread.run(Unknown Source) thanks and regards Awanthika Senarath Software Engineer, WSO2 Inc. Mobile: +94717681791
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev