Class Picker


  • public final class Picker
    extends Dialog
    Helper to manage the picker overlay. It is displayed as a lazy loaded overlay so it inherits from OverlayComponent.
    • Constructor Detail

      • Picker

        public Picker()
        Constructor for the PickerOverlayComponent on coral-dialog.foundation-picker-collection.is-open.
      • Picker

        public Picker​(java.lang.String selector)
        Constructor for the PickerOverlayComponent.
        Parameters:
        selector - the css selector identifying the top picker html element
      • Picker

        public Picker​(java.lang.String selector,
                      ViewType viewType)
        Creates a picker that cannot switch between views. It has only one view defined in the constructor.
        Parameters:
        selector - query selector to attach this picker on
        viewType - initial ViewType
    • Method Detail

      • getItem

        public ColumnViewItem getItem​(java.lang.String itemId)
        Gets the html element associated with the provided collection item id.
        Parameters:
        itemId - the id of the collection item whose corresponding html element is required
        Returns:
        the html element corresponding to the provided item id
      • toggleItem

        public Picker toggleItem​(java.lang.String itemId)
        Toggle selection of the html element associated with the provided collection item id.
        Parameters:
        itemId - the id of the collection item to whom we want to toggle select
        Returns:
        self
      • activateItem

        public Picker activateItem​(java.lang.String itemId)
        Activate the html element associated with the provided collection item id.
        Parameters:
        itemId - the id of the collection item to whom we want to activate
        Returns:
        self
      • close

        public Picker close()
        Closes the picker overlay by clicking on its close button.
        Returns:
        self
      • submit

        public Picker submit()
        Submit the picker overlay with selected Items.
        Returns:
        self
      • switchToView

        public Picker switchToView​(ViewType viewType)
        Parameters:
        viewType - any from supported view (currently viewCard, viewTable, and viewList)
        Returns:
        self object
      • searchFulltext

        public Picker searchFulltext​(java.lang.String keywords)