gwt-exporter

Calling GWT Java function from JavaScript

巧了我就是萌 提交于 2019-12-17 07:31:07
问题 I am a newcomer to GWT and JavaScript. There are similar question of this type I have tried to follow, but I keep failing. I have a GWT app, I need to call a Java function from Javascript( on the onclick of a href tag, in particular.) Following is what I have done. public class JSNITest { public static void handleAnchorClick(int a , int b) { Window.alert("Current row and Column is " + a + " " + b); } public static native void exportMyFunction()/*-{ $wnd.handleAnchorClick = function(param1

Calling GWT Java function from JavaScript

僤鯓⒐⒋嵵緔 提交于 2019-12-17 07:31:04
问题 I am a newcomer to GWT and JavaScript. There are similar question of this type I have tried to follow, but I keep failing. I have a GWT app, I need to call a Java function from Javascript( on the onclick of a href tag, in particular.) Following is what I have done. public class JSNITest { public static void handleAnchorClick(int a , int b) { Window.alert("Current row and Column is " + a + " " + b); } public static native void exportMyFunction()/*-{ $wnd.handleAnchorClick = function(param1

GWT exporter cast exception from GWT.create; Tried to use mvp4g with GWT-Exporter but GWT.create didn't work

泄露秘密 提交于 2019-12-12 06:58:38
问题 I tried to use GWT-Exporter and it worked just fine when I copied the example. Then I tried to export an mvp4g Presenter Here's what I did: @Export() @Presenter(view = RegisterPluginDisplay.class) public class RegisterPluginPresenterImpl extends BasePresenter<RegisterPluginView, MyBus implements RootPresenter { ... } public interface RegisterPluginPresenter extends Exportable { ... } //then in the start event I said: ExporterUtil.exportAll(); It gave me this error: Uncaught java.lang

How to communicate two modules in GWT

强颜欢笑 提交于 2019-12-12 04:58:07
问题 I have created two module name module1 and module2 in gwt application. I want to pass message from module1 to module2 and module2 to module1 simultaneously after some seconds. I write the following code, but it gives me error unable to find module1.gwt.xml in classpath. public void onModuleLoad() { mainBus.fireEvent(new PingEvent("-----Simulation Started-----")); } module1 public void onModuleLoad() { GWTEventBus.mainBus.addHandler(PingEvent.TYPE, new PingEventHandler(){ public void onEvent

GWT-exporter. Working example

戏子无情 提交于 2019-12-11 03:13:39
问题 I have a Java lib and I need to convert it to JS. I found the solution GWT to create utility javascript library to use gwt-exporter. I never used GWT before. I tried GWT-exporter. Getting started but it's not clear how to use it. Simply how to run the project to generate JS? pom.xml <dependencies> <dependency> <groupId>org.timepedia.exporter</groupId> <artifactId>gwtexporter</artifactId> <version>2.4.0</version> <scope>provided</scope> </dependency> </dependencies> Java class: import org