com.vaadin.navigator.

Class ViewBeforeLeaveEvent

  • All Implemented Interfaces:

    Serializable

    public class ViewBeforeLeaveEvent
    extends EventObject

    Event sent to the View instance before navigating away from it.

    Provides a navigate() method which must be called for the navigation to take place.

    Since:

    8.1

    See Also:

    Serialized Form

    • Constructor Detail

      • ViewBeforeLeaveEvent

        public ViewBeforeLeaveEvent​(Navigator navigator,
                                    ViewLeaveAction action)

        Creates a new event instance for the given navigator.

        Parameters:

        navigator - the navigator instance

        action - the command to execute when calling navigate()

    • Method Detail

      • navigate

        public void navigate()

        Performs the navigation which triggered the event in the first place.

      • isNavigateRun

        protected boolean isNavigateRun()

        Checks if the navigate command has been executed.

        Returns:

        true if navigate() has been called, false otherwise