Injecton変数を使用すると少し迷います。
私はこのコードを機能させました:
private XXServiceAsync xxServiceAsync;
@Inject
protected IndexViewImpl(EventBus eventBus, XXServiceAsync tableManagementServiceAsync) {
super(eventBus, mapper);
this.xxServiceAsync = xxServiceAsync;
initializeWidgets();
}
このコードを使用すると、クラス内の必要な場所でRPCサービスを呼び出すことができます(クリックすると...)変数に直接挿入してコードを少しクリアしたいと思います。そうする :
@Inject
private XXServiceAsync xxServiceAsync;
protected IndexViewImpl(EventBus eventBus) {
super(eventBus, mapper);
initializeWidgets();
}
これにより、サービスは常にNULLに保たれます。私は何か間違ったことをしていますか?rpcサービスを使用したGINマジックは、他の方法で実行することを目的としていますか?
ありがとう!