Annotation Type WorkbenchPerspective


  • @Inherited
    @Retention(RUNTIME)
    @Target(TYPE)
    public @interface WorkbenchPerspective
    Indicates that the target class defines a Perspective in the workbench.

    There are two options for defining the arrangement of panels and parts within the perspective: either programmatically build a PerspectiveDefinition object, or declare panel structure and content using Errai UI templates. Note that you cannot mix the two approaches.

    Programmatic Perspective Definition

    To define the perspective layout programmatically, create a zero-argument method annotated with @Perspective that returns a PerspectiveDefinition.

    Templated Perspective Definition

    To declare perspective layout using templates, make the class an Errai UI templated component, and then add the WorkbenchPanel annotation to one or more of its @DataField widgets. This designates them as panel containers and allows you to specify which parts should be added to them when the perspective launches.

    Perspective Lifecycle

    WorkbenchPerspectives receive the standard set of lifecycle calls for a Workbench component:
    • @OnStartup
    • @OnOpen
    • @OnClose
    • @OnShutdown
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String identifier
      The place ID to associate with this perspective.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean isDefault
      Indicates that this perspective should be opened by default when the workbench first starts.
      boolean isDynamic
      Indicates that this perspective can be discovered and loaded at runtime.
      boolean isTransient
      If true (the default), every time this perspective is displayed, it should start fresh with the PerspectiveDefinition returned by the method annotated with @Perspective.
    • Element Detail

      • identifier

        String identifier
        The place ID to associate with this perspective.
        See Also:
        PlaceRequest
      • isDefault

        boolean isDefault
        Indicates that this perspective should be opened by default when the workbench first starts. Exactly one perspective in the whole application should be marked as default.
        Default:
        false
      • isTransient

        boolean isTransient
        If true (the default), every time this perspective is displayed, it should start fresh with the PerspectiveDefinition returned by the method annotated with @Perspective. If false, the framework will store the structure of the perspective (panel arrangements and part placement as modified by the user opening and closing tabs, dragging parts around, and resizing split panels) on the server individually for each user, and use that stored definition in preference to the one returned by the @Perspective method.
        Default:
        true
      • isDynamic

        boolean isDynamic
        Indicates that this perspective can be discovered and loaded at runtime. This is useful when building plugins or extensions where the perspective is part of an external script loaded at runtime, as opposed to being statically compiled into the main application.
        Default:
        false