1. Domino Brix
  2. Presenter lifecycle
  3. Child presenters

Child presenters

Extend ChildPresenter<Parent, View> to defer activation until the parent is active. Routing combines parent and child filters automatically.

Flow

  • If the parent is active, the child activates immediately.
  • If the parent is inactive, the child waits; activation runs when the parent signals ready.
  • setParent and onBindParent run before activation so you can sync state.
			@BrixPresenter
@BrixRoute("details/:id")
@BrixSlot("content-slot")
public class DetailsPresenter extends ChildPresenter<DashboardPresenter, DetailsView> {
  @PathParameter("id") String id;

  @Override
  public void onBindParent(DashboardPresenter parent) {
    view.setHeader(parent.getHeaderTitle());
  }

  @Override
  protected void onActivated() {
    view.loadDetails(id);
  }
}

		

Keep parent-child contracts narrow and prefer notifying children from the parent's onReady() once the view is revealed.

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

Donate & Support Us