2 package jp.gr.java_conf.u6k.money_notebook.gwt.client;
\r
4 import com.google.gwt.core.client.EntryPoint;
\r
5 import com.google.gwt.core.client.GWT;
\r
6 import com.google.gwt.event.dom.client.ClickEvent;
\r
7 import com.google.gwt.event.dom.client.ClickHandler;
\r
8 import com.google.gwt.user.client.Window;
\r
9 import com.google.gwt.user.client.rpc.AsyncCallback;
\r
10 import com.google.gwt.user.client.ui.Button;
\r
11 import com.google.gwt.user.client.ui.RootPanel;
\r
13 public class IndexEntryPoint implements EntryPoint {
\r
15 private final IndexServiceAsync indexService = GWT.create(IndexService.class);
\r
18 public void onModuleLoad() {
\r
19 Button sendButton = new Button("Now time.");
\r
20 sendButton.addClickHandler(new ClickHandler() {
\r
23 public void onClick(ClickEvent event) {
\r
24 IndexEntryPoint.this.indexService.send(new AsyncCallback<String>() {
\r
27 public void onSuccess(String result) {
\r
28 Window.alert(result);
\r
32 public void onFailure(Throwable caught) {
\r
33 Window.alert("error");
\r
41 RootPanel.get("content").add(sendButton);
\r