Package com.vaadin.flow.router
Interface HasDynamicTitle
- All Superinterfaces:
Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Allows to resolve navigation target title dynamically at runtime, based on
the live state of the navigation target instance.
Because getPageTitle() is an instance method, it is resolved from
the view that is actually shown and can therefore reflect state that only
exists once the view has been created and navigated to. Use this interface
when the title depends on such live state, for example:
- a value looked up while building the view and cached in an instance field, so the lookup is not repeated only to compute the title;
- a title that changes after navigation while the view is shown;
- a title that depends on the view's own access control or navigation awareness.
DynamicPageTitle together with a PageTitleGenerator instead.
NOTE: It is not legal for a class to both implement HasDynamicTitle
and have a PageTitle annotation.
- Since:
- 1.0.
- Author:
- Vaadin Ltd
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionGets the title of this navigation target.
-
Method Details
-
getPageTitle
String getPageTitle()Gets the title of this navigation target.- Returns:
- the title of this navigation target
-