Class ViewNavigationSupport

java.lang.Object
io.jmix.flowui.view.navigation.ViewNavigationSupport

@Component("flowui_ViewNavigationSupport") public class ViewNavigationSupport extends Object
Utility class that provides support for navigating between views.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected ViewRegistry
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends com.vaadin.flow.component.Component>
    Optional<T>
    findCurrentNavigationTarget(com.vaadin.flow.component.UI ui, Class<? extends T> navigationTarget)
    Finds the current navigation target of the specified type in the provided UI's active router target chain.
    <T extends com.vaadin.flow.component.Component>
    Optional<T>
    findCurrentNavigationTarget(Class<? extends T> navigationTarget)
    Finds the current navigation target of the specified type in the current UI's active router target chain.
    protected com.vaadin.flow.router.RouteConfiguration
     
    <T, C extends com.vaadin.flow.component.Component & com.vaadin.flow.router.HasUrlParameter<T>>
    void
    navigate(Class<? extends C> navigationTarget, T parameter)
    Navigates to the specified navigation target using the given parameter.
    <T, C extends com.vaadin.flow.component.Component & com.vaadin.flow.router.HasUrlParameter<T>>
    void
    navigate(Class<? extends C> navigationTarget, T parameter, com.vaadin.flow.router.QueryParameters queryParameters)
    Navigates to the specified navigation target using the provided parameter and query parameters.
    <T extends com.vaadin.flow.component.Component>
    Optional<T>
    navigate(Class<? extends T> navigationTarget)
    Navigates to the specified navigation target with empty route and query parameters.
    <T extends com.vaadin.flow.component.Component>
    Optional<T>
    navigate(Class<? extends T> navigationTarget, com.vaadin.flow.router.RouteParameters routeParameters)
    Navigates to the specified navigation target using the provided route parameters.
    <T extends com.vaadin.flow.component.Component>
    Optional<T>
    navigate(Class<? extends T> navigationTarget, com.vaadin.flow.router.RouteParameters routeParameters, com.vaadin.flow.router.QueryParameters queryParameters)
    Navigates to the specified navigation target using the provided route and query parameters.
    void
    navigate(String viewId)
    Navigates to the specified view identified by its ID with empty route and query parameters.
    void
    navigate(String viewId, com.vaadin.flow.router.RouteParameters routeParameters)
    Navigates to the specified view identified by its ID using the provided route parameters and empty query parameters.
    void
    navigate(String viewId, com.vaadin.flow.router.RouteParameters routeParameters, com.vaadin.flow.router.QueryParameters queryParameters)
    Navigates to the specified view identified by its ID using the provided route and query parameters.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ViewNavigationSupport

      public ViewNavigationSupport(ViewRegistry viewRegistry)
  • Method Details

    • findCurrentNavigationTarget

      public <T extends com.vaadin.flow.component.Component> Optional<T> findCurrentNavigationTarget(Class<? extends T> navigationTarget)
      Finds the current navigation target of the specified type in the current UI's active router target chain.
      Type Parameters:
      T - the type of the navigation target
      Parameters:
      navigationTarget - the class of the component representing the navigation target
      Returns:
      an Optional containing the found navigation target if available, otherwise an empty Optional
    • findCurrentNavigationTarget

      public <T extends com.vaadin.flow.component.Component> Optional<T> findCurrentNavigationTarget(com.vaadin.flow.component.UI ui, Class<? extends T> navigationTarget)
      Finds the current navigation target of the specified type in the provided UI's active router target chain.
      Type Parameters:
      T - the type of the navigation target
      Parameters:
      ui - the UI instance in which the search is performed
      navigationTarget - the class of the component representing the navigation target
      Returns:
      an Optional containing the found navigation target if available, otherwise an empty Optional
    • getRouteConfiguration

      protected com.vaadin.flow.router.RouteConfiguration getRouteConfiguration()