Using GIN and mvp4g

I would like to use gwt-dispatch Command Patter in my application. I also use mvp4g. How can I make it DefaultDispatchAsyncaccessible to enter my presenters using the GIN or make it available worldwide, so I can access it from my presenters?

+3
source share
1 answer

You need to set the binding for the DefaultDispatchAsync class in your gin module. This will set the binding for the DispatchAsync interface, which implements the DefaultDispatchAsync class. You can then add DispatchAsync to your presenter constructor and enter it with a gin if necessary.

, DispatchAsync, DispatchAsync . .

, GinModule

bind(DefaultDispatchAsync.class);

@Inject
public TestPresenter(/*Other injected arguments*/, final DispatchAsync dispatcher) {
   this.dispatcher = dispatcher;
}
+2

Source: https://habr.com/ru/post/1744061/


All Articles