Annotation Interface ModalRoot


@Retention(RUNTIME) @Target(TYPE) @Inherited public @interface ModalRoot
The purpose of this annotation is to help Popover decide where to auto-attach itself based on the target component.

Normally, Popover attaches to the UI's root element, using the UI#addToModalComponent method. But that is problematic when the target component is attached inside an element with modality, such as Dialog. This prevents any events in the client-side fired from the Popover component or any of its children from being listened to in the server-side.

To solve this, Popover tries to find the closest parent component that has this annotation, and attaches to that component instead of the UI root.

Internal use only. May be renamed or removed in a future release.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The slot to use when attaching to the modal root.
  • Element Details

    • slot

      String slot
      The slot to use when attaching to the modal root. If empty, no slot attribute is set.
      Default:
      ""