Created
March 20, 2018 08:50
-
-
Save lofidewanto/2262441fe61f887158347f68418f04e3 to your computer and use it in GitHub Desktop.
GWT Boot - Better Implementation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hello.client; | |
import com.google.gwt.core.client.*; | |
import com.google.gwt.user.client.ui.*; | |
@GwtModule(renameTo="basic") | |
public class YourEntryPoint implements EntryPoint { | |
@Override | |
public void onModuleLoad() { | |
Button button = new Button("Click me"); | |
button.addClickHandler(clickEvent -> { | |
Window.alert("Hello World!"); | |
}); | |
RootPanel.get("helloButton").add(button); | |
} | |
@GwtModuleProperty | |
public String inherits() { | |
return "com.github.gwtboot.starter.Starter"; | |
} | |
@GwtModuleProperty | |
public String sourcePath() { | |
return "client"; | |
} | |
@GwtModuleProperty | |
public Map setProperty() { | |
Map<String, String> map = new HashMap<>(); | |
map.add("gwt.logging.logLevel", "INFO"); | |
map.add("gwt.logging.enabled", "TRUE"); | |
return map; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, I agree with you.