Annotation Interface CDIView


@Stereotype @Retention(RUNTIME) @Target({FIELD,TYPE}) public @interface CDIView
Classes implementing View and annotated with @CDIView are automatically registered with CDIViewProvider for use by CDINavigator.

By default, the view name is derived from the class name of the annotated class, but this can also be overridden by defining a value().

@CDIView views are by default ViewScoped.

On a @CDIView view the strategy for the view context can be defined by annotating the view with a ViewContextStrategyQualifier annotation. By default it is ViewContextByNameAndParameters.

See Also:
  • Named
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<? extends com.vaadin.ui.UI>[]
    Specifies which UIs can show the view.
    The name of the CDIView can be derived from the simple class name So it is optional.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    USE_CONVENTIONS is treated as a special case that will cause the automatic View mapping to occur.
  • Field Details

    • USE_CONVENTIONS

      static final String USE_CONVENTIONS
      USE_CONVENTIONS is treated as a special case that will cause the automatic View mapping to occur.
      See Also:
  • Element Details

    • value

      String value
      The name of the CDIView can be derived from the simple class name So it is optional. Also multiple views without a value may exist at the same time.

      Example: UserDetailView by convention becomes "user-detail" and UserCDIExample becomes "user-cdi-example".

      Default:
      "USE CONVENTIONS"
    • uis

      Class<? extends com.vaadin.ui.UI>[] uis
      Specifies which UIs can show the view. CDIViewProvider only lists the views that have the current UI on this list.

      If this list contains UI.class, the view is available for all UIs.

      This only needs to be specified if the application has multiple UIs that use CDIViewProvider.

      Returns:
      list of UIs in which the view can be shown.
      Default:
      {com.vaadin.ui.UI.class}