Frage

I am using GWTP (MVP framework by Google) with GWT 2.3. I want to use GWT code splitting with my presenters.

I know about @ProxyCodeSplit annotation in Presenters. Like below

@ProxyCodeSplit
@UseGatekeeper(LoggedInGatekeeper.class)
public interface MyProxy extends Proxy<MainPagePresenter> {
}

Is this sufficient ? Or Do I need to dig out GWT Code Splitting which provides A call to GWT.runAsync like Here

War es hilfreich?

Lösung

No, GWTP will take care of calling GWT.runAsync for you, whenever the corresponding Presenter is shown.
However make sure that you use AsyncProvider in your Ginjector:

@GinModules({ MyModule.class })
public interface MyGinjector extends Ginjector {
  PlaceManager getPlaceManager();
  EventBus getEventBus();
  AsyncProvider<MainPagePresenter> getMainPagePresenter();
}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top