com.vaadin.flow.router.

Annotation Type RouteAlias


  • @Retention(value=RUNTIME)
     @Target(value=TYPE)
     @Inherited
     @Documented
     @Repeatable(value=RouteAlias.Container.class)
    public @interface RouteAlias

    Defines the route alias for components that function as navigation targets in routing.

    The route alias allows declaring several route paths in addition to the path declared by the Route annotation. The component has to have at least one @Route annotation which is considered as a primary route and its route path will be used if Router.getUrl(Class) is called. Thus @RouteAlias route path is used only to resolve the component during navigation.

    This annotation can be used multiple times on the same class.

    See Also:

    Route

    • Required Element Summary

      Required Elements
      Modifier and Type Required Element and Description
      String value

      Gets the route alias path value of the annotated class.

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      boolean absolute

      Have the route chain break on defined class and not take into notice any more parent layout route prefixes.

      Class<? extends RouterLayout> layout

      Sets the parent component for the route target component.

    • Element Detail

      • value

        public abstract String value

        Gets the route alias path value of the annotated class.

        Returns:

        the path value of this route

      • layout

        public abstract Class<? extends RouterLayout> layout

        Sets the parent component for the route target component.

        When navigating between components that use the same layout, the same component instance is reused.

        Returns:

        the layout component class used by the route target component. The default is the UI of the application.

        Default:

        com.vaadin.flow.component.UI.class

      • absolute

        public abstract boolean absolute

        Have the route chain break on defined class and not take into notice any more parent layout route prefixes.

        Returns:

        route up to here should be absolute

        Default:

        false