Class AbstractSelectorSection
java.lang.Object
de.hybris.platform.cockpit.components.navigationarea.NavigationPanelSection
de.hybris.platform.cockpit.components.navigationarea.AbstractSelectorSection
- All Implemented Interfaces:
SelectorSection,Section,CockpitEventAcceptor
- Direct Known Subclasses:
CmsCatalogSelectorSection,CmsSiteSelectorSection,DefaultSectionSelectorSection
public abstract class AbstractSelectorSection
extends NavigationPanelSection
implements SelectorSection, CockpitEventAcceptor
Abstract class to be used by
selector sections implementations.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetItems()Returns this selector's (root) items.Returns the navigation area model to which this section belongs.Returns the currently selected item.Returns the selector's currently selected items.booleanReturns whether initial selection is enabled or not.booleanisItemActive(TypedObject item) Please seeSelectorSection.isItemActive(TypedObject).booleanReturns whether this selector supports multiple selection or not.voidonCockpitEvent(CockpitEvent event) abstract voidCalled whenever this selector's selection has changed.voidsetInitiallySelected(boolean initSelection) Sets whether the first item should be initially selected or not.voidsetItems(List<TypedObject> items) Sets the (root) items which this selector should render.voidsetMultiple(boolean multi) Sets whether this selector supports multiple selection or not.voidsetNavigationAreaModel(AbstractNavigationAreaModel navAreaModel) Sets the model of the navigation area to which this selector belongs.voidsetSelectedItem(TypedObject selectedItem) Sets the selector's selected item toselectedItemvoidsetSelectedItems(List<TypedObject> selectedItems) Sets the selector's selected items toselectedItems.voidsetSelectedItemsDirectly(List<TypedObject> selectedItems) Does the same thing asSelectorSection.setSelectedItems(List)with the exception that no event is fired.static List<TypedObject>wrapItems(Collection<? extends ItemModel> itemModels) Deprecated.since 6.3, will become obsolete when the cockpit's type service has support for service layer modelsMethods inherited from class de.hybris.platform.cockpit.components.navigationarea.NavigationPanelSection
getAttribute, getLabel, getLocalizedLabel, isInitialOpen, isOpen, isTabbed, isVisible, setAttribute, setLabel, setLocalizedLabel, setOpen, setRenderer, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.cockpit.components.sectionpanel.Section
getLabel, getLocalizedLabel, isInitialOpen, isOpen, isTabbed, isVisible, setOpen
-
Field Details
-
selectedItems
-
-
Constructor Details
-
AbstractSelectorSection
public AbstractSelectorSection()
-
-
Method Details
-
getItems
Description copied from interface:SelectorSectionReturns this selector's (root) items.- Specified by:
getItemsin interfaceSelectorSection- Returns:
- the root items of this selector
-
isMultiple
public boolean isMultiple()Description copied from interface:SelectorSectionReturns whether this selector supports multiple selection or not.- Specified by:
isMultiplein interfaceSelectorSection- Returns:
trueif multiple selection is allowed,falseotherwise
-
setItems
Description copied from interface:SelectorSectionSets the (root) items which this selector should render.- Specified by:
setItemsin interfaceSelectorSection- Parameters:
items- this selector's new items
-
setMultiple
public void setMultiple(boolean multi) Description copied from interface:SelectorSectionSets whether this selector supports multiple selection or not.- Specified by:
setMultiplein interfaceSelectorSection- Parameters:
multi- whether multiple selection should be allowed or not
-
setSelectedItem
Description copied from interface:SelectorSectionSets the selector's selected item toselectedItem- Specified by:
setSelectedItemin interfaceSelectorSection- Parameters:
selectedItem- the selected item
-
setSelectedItems
Description copied from interface:SelectorSectionSets the selector's selected items toselectedItems.- Specified by:
setSelectedItemsin interfaceSelectorSection- Parameters:
selectedItems- the new selection of the selector- See Also:
-
setSelectedItemsDirectly
Description copied from interface:SelectorSectionDoes the same thing asSelectorSection.setSelectedItems(List)with the exception that no event is fired.- Specified by:
setSelectedItemsDirectlyin interfaceSelectorSection- Parameters:
selectedItems- the selected items- See Also:
-
getSelectedItems
Description copied from interface:SelectorSectionReturns the selector's currently selected items.- Specified by:
getSelectedItemsin interfaceSelectorSection- Returns:
- the selector's selected items
-
getSelectedItem
Returns the currently selected item. If there are multiple selected items, the first one is returned.- Specified by:
getSelectedItemin interfaceSelectorSection- Returns:
- the selected item or
nullif no items have been selected - See Also:
-
getRenderer
- Overrides:
getRendererin classNavigationPanelSection
-
selectionChanged
public abstract void selectionChanged()Description copied from interface:SelectorSectionCalled whenever this selector's selection has changed.- Specified by:
selectionChangedin interfaceSelectorSection
-
isItemActive
Please seeSelectorSection.isItemActive(TypedObject). Note: This implementation always returnsfalse.- Specified by:
isItemActivein interfaceSelectorSection- Parameters:
item- the item- Returns:
trueifitemis active,falseotherwise
-
wrapItems
Deprecated.since 6.3, will become obsolete when the cockpit's type service has support for service layer modelsWraps the items. Note: This method should be removed when the cockpit'stype servicesupports Service layermodels.- Parameters:
itemModels- items to wrap- Returns:
- the wrapped items
-
setInitiallySelected
public void setInitiallySelected(boolean initSelection) Description copied from interface:SelectorSectionSets whether the first item should be initially selected or not.- Specified by:
setInitiallySelectedin interfaceSelectorSection- Parameters:
initSelection-trueif inital selection should be enabled,falseotherwise
-
isInitiallySelected
public boolean isInitiallySelected()Description copied from interface:SelectorSectionReturns whether initial selection is enabled or not.- Specified by:
isInitiallySelectedin interfaceSelectorSection- Returns:
trueif initial selection is enabled,falseotherwise
-
onCockpitEvent
- Specified by:
onCockpitEventin interfaceCockpitEventAcceptor
-