/** * Performs the navigation which triggered the event in the first place. */ public void navigate() { if (navigateRun) { throw new IllegalStateException( "navigate() can only be called once"); } action.run(); navigateRun = true; }
View currentView = getCurrentView(); if (currentView == null) { action.run(); } else { ViewBeforeLeaveEvent beforeLeaveEvent = new ViewBeforeLeaveEvent(