1. Domino Brix
  2. Presenter lifecycle
  3. Navigation confirmation

Confirm navigation

If the view implements CanConfirmNavigation or ProvidesConfirmNavigation, Brix installs a history interceptor on activation to prompt before leaving when isConfirmNavigation() is true.

			@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;
}

		

Behavior

  • Interceptor added on activation; removed on deactivation.
  • On token change, confirmNavigation decides whether to continue.
  • Use onConfirmed() / onCanceled() handlers to control navigation.

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

Donate & Support Us