com.vaadin.flow.router.
Annotation Type Route
-
@Retention(value=RUNTIME) @Target(value=TYPE) @Inherited @Documented public @interface Route
Defines the route for components that function as navigation targets in routing.
There is also
RouteAlias
annotation which may be declared in addition to this annotation and may be used mutiple times.See Also:
-
-
Field Summary
Fields Modifier and Type Fields and Description static String
NAMING_CONVENTION
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element and Description boolean
absolute
Have the rout 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.
String
value
Gets the route path value of the annotated class.
-
-
-
Field Detail
-
NAMING_CONVENTION
public static final String NAMING_CONVENTION
-
-
Element Detail
-
value
public abstract String value
Gets the route path value of the annotated class.
If no value is provided, the path will be derived from the class name of the component. The derived name will be in lower case and trailing "View" will be removed. Also, MainView or Main names will be mapped to root (value will be "").
Note for framework developers: do not use the value directly, but use the helper method
Router.resolve(Class, Route)
, so that naming convention based values are dealt correctly.Returns:
the explicit path value of this route
Default:
"___NAMING_CONVENTION___"
-
-
-
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. Default layout target is the
UI
, but the layout should not be a customUI
asUI
is a special class used to know where the route stack ends and no parent layouts should be involved.All layout stacks will be appended to the
UI
as it represents the Body element.Returns:
the layout component class used by the route target component.
See Also:
Default:
com.vaadin.flow.component.UI.class
-
-