com.vaadin.flow.router.

Class BeforeEnterEvent

All Implemented Interfaces:

Serializable

public class BeforeEnterEvent extends BeforeEvent

Event created before navigation happens.

Since:

1.0

Author:

Vaadin Ltd

See Also:

  • Constructor Details

    • BeforeEnterEvent

      public BeforeEnterEvent(NavigationEvent event, Class<?> navigationTarget, List<Class<? extends RouterLayout>> layouts)

      Constructs event from a NavigationEvent.

      Parameters:

      event - NavigationEvent that is on-going, not null

      navigationTarget - navigation target, not null

      layouts - navigation layout chain, not null

    • BeforeEnterEvent

      public BeforeEnterEvent(NavigationEvent event, Class<?> navigationTarget, RouteParameters parameters, List<Class<? extends RouterLayout>> layouts)

      Constructs event from a NavigationEvent.

      Parameters:

      event - NavigationEvent that is on-going, not null

      navigationTarget - navigation target, not null

      parameters - route parameters, not null

      layouts - navigation layout chain, not null

    • BeforeEnterEvent

      public BeforeEnterEvent(Router router, NavigationTrigger trigger, Location location, Class<?> navigationTarget, UI ui, List<Class<? extends RouterLayout>> layouts)

      Constructs a new BeforeEnterEvent.

      Parameters:

      router - the router that triggered the change, not null

      trigger - the type of user action that triggered this location change, not null

      location - the new location, not null

      navigationTarget - navigation target class, not null

      ui - the UI related to the navigation, not null

      layouts - the layout chain for the navigation target, not null

    • BeforeEnterEvent

      public BeforeEnterEvent(Router router, NavigationTrigger trigger, Location location, Class<?> navigationTarget, RouteParameters parameters, UI ui, List<Class<? extends RouterLayout>> layouts)

      Constructs a new BeforeEnterEvent.

      Parameters:

      router - the router that triggered the change, not null

      trigger - the type of user action that triggered this location change, not null

      location - the new location, not null

      navigationTarget - navigation target class, not null

      parameters - route parameters, not null

      ui - the UI related to the navigation, not null

      layouts - the layout chain for the navigation target, not null

  • Method Details

    • isRefreshEvent

      public boolean isRefreshEvent()

      Check if event is for a refresh of a preserveOnRefresh view.

      Returns:

      true if refresh of a preserve on refresh view

    • isErrorEvent

      public boolean isErrorEvent()

      Check if the event is fired by an error handler.

      Returns:

      true if the event is fired by an error handler.