1. Domino Brix
  2. Presenter lifecycle
  3. Construction & DI

Construction & dependency injection

Generated *PresenterImpl instances are created by Dagger. Global services (@Global history, events, slots, config, security) and the concrete view are injected automatically; you never bind the view by hand.

			@BrixPresenter
@BrixRoute("dashboard")
@BrixSlot(BrixSlots.BRIX_BODY_SLOT)
public class DashboardPresenter extends Presenter<DashboardView> {
  // No manual view binding needed
}

@UiView
public class DashboardView extends BrixView<Element, DashboardHandlers>
    implements DashboardPresenter.DashboardView {
  @Handlers DashboardHandlers handlers;
}

		

What happens

  • Dagger constructs the generated presenter implementation.
  • Global services and injected fields/constructors are satisfied.
  • The concrete view is injected and stored in view.
  • Handlers, event listeners, routing params, and slot metadata are wired during construction.

We are a group of passionate people who love what we do

Donate & Support Us