@Deprecated public final class RouterUtil extends RouteUtil
Modifier and Type | Method and Description |
---|---|
static void |
checkForDuplicates(Class<? extends Component> routeTargetType,
Collection<Class<? extends RouterLayout>> routeLayoutTypes)
Deprecated.
Checks that the same component type is not used in multiple parts of a
route chain.
|
static LocationChangeEvent |
createEvent(NavigationEvent event,
List<HasElement> routeTargetChain)
Deprecated.
Create a new location change event for given navigation event and chain.
|
static List<Class<? extends RouterLayout>> |
getParentLayouts(Class<?> component,
String path)
Deprecated.
Get parent layouts for navigation target according to the
Route
or RouteAlias annotation. |
static void |
updatePageTitle(NavigationEvent navigationEvent,
Component routeTarget)
Deprecated.
Updates the page title according to the currently visible component.
|
getParentLayoutsForNonRouteTarget, getRouteAliasPath, getRoutePath, getTopParentLayout, resolve
public static List<Class<? extends RouterLayout>> getParentLayouts(Class<?> component, String path)
Route
or RouteAlias
annotation.component
- navigation target to get parents forpath
- path used to get navigation target so we know which annotation
to handlepublic static void updatePageTitle(NavigationEvent navigationEvent, Component routeTarget)
Uses HasDynamicTitle.getPageTitle()
if implemented, or else the
PageTitle
annotation, to resolve the title.
navigationEvent
- the event object about the navigationrouteTarget
- the currently visible componentpublic static void checkForDuplicates(Class<? extends Component> routeTargetType, Collection<Class<? extends RouterLayout>> routeLayoutTypes)
routeTargetType
- the actual component in the route chainrouteLayoutTypes
- the parent types in the route chainpublic static LocationChangeEvent createEvent(NavigationEvent event, List<HasElement> routeTargetChain)
event
- current navigation eventrouteTargetChain
- chain of route targetsCopyright © 2023. All rights reserved.