Search in sources :

Example 1 with ComponentData

use of com.adobe.cq.wcm.core.components.models.datalayer.ComponentData in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class CarouselImpl method getDataLayerShownItems.

/*
     * DataLayerProvider implementation of field getters
     */
@Override
public String[] getDataLayerShownItems() {
    String[] shownItems = new String[0];
    List<ListItem> items = getItems();
    if (!items.isEmpty()) {
        ComponentData componentData = items.get(0).getData();
        if (componentData != null) {
            shownItems = new String[] { componentData.getId() };
        }
    }
    return shownItems;
}
Also used : ComponentData(com.adobe.cq.wcm.core.components.models.datalayer.ComponentData) ListItem(com.adobe.cq.wcm.core.components.models.ListItem)

Aggregations

ListItem (com.adobe.cq.wcm.core.components.models.ListItem)1 ComponentData (com.adobe.cq.wcm.core.components.models.datalayer.ComponentData)1