Interface BeforeLeaveListener

  • All Superinterfaces:
    BeforeLeaveHandler, Serializable
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface BeforeLeaveListener
    extends BeforeLeaveHandler
    A listener that may be added to the UI using UI.addBeforeLeaveListener(BeforeLeaveListener).

    All listeners added this way will be informed when old components are detached from the UI.

    During this phase there is the possibility to reroute to another navigation target or to postpone the navigation (to for instance get user input).

    If a route target is left for reasons not under the control of the navigator (for instance using Page.setLocation(URI), typing a URL into the address bar, or closing the browser), listeners are not called. All BeforeLeaveListeners will be executed before the BeforeLeaveObservers. To control the order of execution of BeforeLeaveListeners, see ListenerPriority

    Since:
    1.0