-1
final HTML statushHTML =新しいHTML( " "、true);GWTコードの中にjavascriptを埋め込む方法はありますか?
statushHTML.setHTML(結果);スクリプトの使用ScriptInjector
を挿入する必要がある場合は
//結果に私は、文字列
1. result = <b> bold </b> // it displays bold 2. result = <i> italics </i> // it works 3. result = <font color='red'> red </font> // it works again 4. result = <h1> h1 tag </h1> // this also works fine But if i try 5. result = <script> alert('No output') </script> // now it doesn't work It's just displaying it in string format.
私は、クライアント側からのRPCコールを送信しようと文字列の形式で、サーバー側からの応答を返すが、それは他のタグではないのスクリプトタグを読んでいるのですが、私はScriptInjectorを使用してみましたこのエラーが発生しています。 com.google.gwt.user.server.rpc.UnexpectedException:サービスメソッド 'public abstract java.lang.String com.customer.phone.client.CustomerService.userValidation(java。 lang.String)throw java.lang.IllegalArgumentException '予期しない例外がスローされました:java.lang.NoClassDefFoundError:クラスcom.google.gwt.core.client.ScriptInjectorを初期化できませんでした – marco
私は必要ですか?私のアプローチを変える? – marco