Annotation Interface ReadViewTemplate


@Target(TYPE) @Retention(RUNTIME) public @interface ReadViewTemplate
Declares that the framework generates a read view for the annotated entity at runtime.

The generated view shows the entity and cannot edit it. It is registered as the entity's primary read view, so read view resolution finds it: the read view navigator, a list_read action and an entity_read action all open it. Its route requires an entity id, so the view always opens for an existing instance. Note that the generated list view carries no list_read action of its own.

  • Element Details

    • path

      String path
      Resource path to the Freemarker XML descriptor template.
      Default:
      "io/jmix/flowui/view/template/read-view.ftl"
    • templateParams

      String templateParams
      JSON object with additional template parameters.
      Default:
      ""
    • viewId

      String viewId
      View id. If empty, the framework uses <entityName>.read.
      Default:
      ""
    • viewRoute

      String viewRoute
      Base view route. The framework always appends /:id/read. If empty, the framework derives the base route from viewId.
      Default:
      ""
    • viewTitle

      String viewTitle
      View title. If empty, the framework uses <entityName>.

      If the value starts with msg://, it is treated as a message reference and resolved through the Messages bean. Both the full format msg://group/message_id and the brief format msg://message_id (resolved against the entity package) are supported.

      Default:
      ""
    • readEntityContainerId

      String readEntityContainerId
      Shown entity container id used by the generated controller. As with DetailViewTemplate.editedEntityContainerId(), the stock template declares the container under the default id, so a different value goes together with a custom path().
      Default:
      "entityDc"