Annotation Interface PageTitle


@Retention(RUNTIME) @Target(TYPE) public @interface PageTitle
Defines the page title for a navigation target.

This defines a static title. For a title that needs to be computed without creating an instance of the navigation target (for example for the routes of a breadcrumb trail or a menu), annotate the route with DynamicPageTitle instead; the value() declared here is then available to the generator as a key. For a title that depends on the live state of an already shown view, implement HasDynamicTitle.

Since:
1.0
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Gets the title that should be used.
  • Element Details

    • value

      String value
      Gets the title that should be used.

      Empty string will clear any previous page title. In that case the browser will decide what to show as the title, most likely the url.

      When the route is also annotated with DynamicPageTitle, this value is handed to the generator through PageTitleContext.value() rather than used as the title directly, so a generic generator can use it as a key (for example an i18n message key) to resolve the title.

      You may dynamically update the title for an already shown view by implementing the HasDynamicTitle.getPageTitle() method.

      Returns:
      a page title string