Class CollectionSwitcher


  • public class CollectionSwitcher
    extends AEMBaseComponent
    The collection switcher component wrapper.
    • Constructor Detail

      • CollectionSwitcher

        public CollectionSwitcher()
        Construct a CollectionSwitcherComponent.
    • Method Detail

      • switchToView

        public boolean switchToView​(ViewType viewType)
        Tries to switch the attached collection to the specified view. It identifies the switcher and checks if the icon for the current view is already the one desired. If not, clicks the switcher to show the overlay with the possible views and chose from there.
        Parameters:
        viewType - - the icon corresponding to the view to switch to.
        Returns:
        {Boolean} true if the view was indeed changed or false if the desired view was already already the current one.