Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWTP Code Splitting

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

like image 575
Hardik Mishra Avatar asked Jun 27 '26 13:06

Hardik Mishra


1 Answers

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();
}
like image 98
Ümit Avatar answered Jun 30 '26 13:06

Ümit