良い一日!gwt 2.5 から始めました。NetBeans_7 に org-netbeans-modules-gwt4nb-2.10.5.nbm をインストールしました。GlassFish 3+ を使用して NetBeans_7 で簡単な gwt アプリ (ここにリンクの説明を入力) をビルドして実行した後、デフォルトのブラウザー (firefox_14) が対応するページを起動し、空のページを出力しました。どうしたの?また、firefox_14 に gwt dev プラグインをインストールしましたが、同じ結果が得られました。
メインエントリーポイント
...
public class MainEntryPoint implements EntryPoint {
/**
* Creates a new instance of MainEntryPoint
*/
public MainEntryPoint() {
}
/**
* The entry point method, called automatically by loading a module that
* declares an implementing class as an entry-point
*/
@Override
public void onModuleLoad() {
final Label label = new Label("Hello, GWT!!!");
final Button button = new Button("Click me!");
button.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
label.setVisible(!label.isVisible());
}
});
RootPanel.get().add(button);
RootPanel.get().add(label);
}
}
...
HelloGWT.html
<!doctype html>
<!--
The DOCTYPE declaration above will set the browser's rendering engine into
"Standards Mode". Replacing this declaration with a "Quirks Mode" doctype may
lead to some differences in layout.
-->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name='gwt:module' content='gwt.intro.Main=gwt.intro.Main'>
<title>Main</title>
</head>
<body>
<script type="text/javascript" src="gwt.intro.Main/gwt.intro.Main.nocache.js"></script>
<!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
<noscript>
<div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
Your web browser must have JavaScript enabled
in order for this application to display correctly.
</div>
</noscript>
</body>
</html>
次の警告が表示されます。
- GWT クライアント側コードのコンパイル。 警告: 「com.google.gwt.dev.GWTCompiler」は非推奨であり、将来のリリースで削除される予定です。代わりに「com.google.gwt.dev.Compiler」を使用してください。(この警告を無効にするには、 -Dgwt.nowarn.legacy.tools を JVM 引数として渡します。);
- 「 com.google.gwt.useragent.client.UserAgentAsserter」の可能なすべての再バインド結果を計算しています 再バインド com.google.gwt.useragent.client.UserAgentAsserter .SimpleBeanEditorDriver'. クラスパスに validation-api-.jar と validation-api--sources.jar がありますか? すべてのエラーを表示するには、-logLevel DEBUG を指定します。 [警告]不明なタイプ 'com.google.gwt.editor.client.SimpleBeanEditorDriver' が遅延バインディング ルールで指定されました
アプリを実行するとすぐに、サーバーから次のメッセージが表示されます: http://postimage.org/image/uf6lcczjb/