@Retention(value=RUNTIME) @Target(value=TYPE) @Inherited @Documented @Repeatable(value=RouteAlias.Container.class) public @interface RouteAlias
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 RouteConfiguration.getUrl(Class)
is
called. Thus @RouteAlias
route path is used only to resolve the
component during navigation.
The route template of the navigation target is composed of the values of all
RoutePrefix
annotated on the layout()
and
ParentLayout
class values, starting from the root parent and joined
together using slash delimiter to form a path form string.
This annotation can be used multiple times on the same class.
Route
,
RoutePrefix
,
RouterLayout
,
UI
Modifier and Type | Required Element and Description |
---|---|
String |
value
Gets the route alias path value of the annotated class.
|
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.
|
public abstract String value
This value accepts also parameter template segments which can be defined
using following format: :parameterName[?|*][(regex)]
.
public abstract Class<? extends RouterLayout> layout
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 custom UI
as UI
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.
RouterLayout
Copyright © 2021. All rights reserved.