Interface SelectorSection

All Superinterfaces:
Section
All Known Subinterfaces:
DrillableSelectorSection, SectionSelectorSection
All Known Implementing Classes:
AbstractDrillableSelectorSection, AbstractSelectorSection, CatalogVersionSectionSelectorSection, CategoryDrillableSelectorSection, CategorySectionSelectorSection, CmsCatalogSelectorSection, CmsSiteSelectorSection, DefaultSectionSelectorSection, LiveCatalogVersionSectionSelectorSection, LiveSiteSectionSelectorSection, SiteSectionSelectorSection, WebsiteCatalogVersionSelectorSection, WebsitesSelectorSection

public interface SelectorSection extends Section
Section which allows the user to select items and handle events.
  • Method Details

    • setItems

      void setItems(List<TypedObject> items)
      Sets the (root) items which this selector should render.
      Parameters:
      items - this selector's new items
    • getItems

      List<TypedObject> getItems()
      Returns this selector's (root) items.
      Returns:
      the root items of this selector
    • setMultiple

      void setMultiple(boolean multi)
      Sets whether this selector supports multiple selection or not.
      Parameters:
      multi - whether multiple selection should be allowed or not
    • isMultiple

      boolean isMultiple()
      Returns whether this selector supports multiple selection or not.
      Returns:
      true if multiple selection is allowed, false otherwise
    • setSelectedItems

      void setSelectedItems(List<TypedObject> selectedItems)
      Sets the selector's selected items to selectedItems.
      Parameters:
      selectedItems - the new selection of the selector
      See Also:
    • setSelectedItem

      void setSelectedItem(TypedObject selectedItem)
      Sets the selector's selected item to selectedItem
      Parameters:
      selectedItem - the selected item
    • setSelectedItemsDirectly

      void setSelectedItemsDirectly(List<TypedObject> selectedItems)
      Does the same thing as setSelectedItems(List) with the exception that no event is fired.
      Parameters:
      selectedItems - the selected items
      See Also:
    • getSelectedItems

      List<TypedObject> getSelectedItems()
      Returns the selector's currently selected items.
      Returns:
      the selector's selected items
    • getSelectedItem

      TypedObject getSelectedItem()
      Returns the selected item.

      Note: In multiple selection mode, it is up to the implementing classes to define what is considered to be the selected item.

      Returns:
      the selected item
      See Also:
    • selectionChanged

      void selectionChanged()
      Called whenever this selector's selection has changed.
    • isItemActive

      boolean isItemActive(TypedObject item)
      Returns whether the item item is active or not. Exactly what active means depends on the implementation. Typically active selector items are rendered differently than normal items.

      Parameters:
      item - the item
      Returns:
      true if item is active, false otherwise
    • setInitiallySelected

      void setInitiallySelected(boolean initSelection)
      Sets whether the first item should be initially selected or not.
      Parameters:
      initSelection - true if inital selection should be enabled, false otherwise
    • isInitiallySelected

      boolean isInitiallySelected()
      Returns whether initial selection is enabled or not.
      Returns:
      true if initial selection is enabled, false otherwise