Add after close action after open view

I open a view like this
viewNavigators.detailView(dispositivoAntincendioImpiantoesDataGrid)
.newEntity()
.withViewClass(DispositivoAntincendioImpiantoDetailView.class)
.withAfterNavigationHandler(afterViewNavigationEvent → {
DispositivoAntincendioImpiantoDetailView view = afterViewNavigationEvent.getView();
view.setImpianto(getEditedEntity());
view.setNumeroDispositivo();
view.setTipoDisp(tipo.getValue());
})
.withBackwardNavigation(true)
.navigate();
}

I would like to manage the operations to be done when the view closes. How can I do it ?

Hello!

ViewNavigators does not provide close handler because of URL-based navigation. There are options where you can handle closing View:

  • Open view as dialog using DialogWindows.
  • Listen global ViewClosedEvent in Spring bean.
  • Use Tabbed Application mode add-on