The atg.projects.store.assembler.cartridge.CategoryHeaderBannerContentItem class represents the content item that the HeaderBanner-ATGCategory cartridge returns to the renderer. The CategoryHeaderBannerContentItem class has three properties:

The /atg/endeca/assembler/cartridge/handler/CategoryHeaderBanner component, which is of class atg.projects.store.assembler.cartridge.handler.CategoryHeaderBannerHandler, is the cartridge handler responsible for creating and populating the CategoryHeaderBannerContentItem object. The CategoryHeaderBannerHandler class is an extension of the com.endeca.infront.cartridge.NavigationCartridgeHandler class with an overridden process() method. The process() method retrieves the current navigation state from the /atg/endeca/assembler/cartridge/manager/NavigationState component and creates a new CategoryHeaderBannerContentItem object. A call to the CategoryHeaderBannerHandler.loadBannerItemDetails() method populates the CategoryHeaderBannerContentItem object with data from the catalog repository and returns it to the JSP renderer.

The process() method also calls the CategoryHeaderBannerHandler.validateItem() method, which applies the CollectionObjectValidator components listed in the validators property to the hero image item and the promotional content item to validate them. By default, the validators property is set to the /atg/store/collections/validator/StartEndDateValidator component.

To populate the content item, the loadBannerItemDetails() method uses the /atg/endeca/assembler/cartridge/StoreCartridgeTools component to retrieve the currently chosen category and its associated top-level category from the atg.projects.store.catalog.CatalogNavigationService class. The loadBannerItemDetails() method sets the content item’s headerTitle property to the current category’s displayName value. It also sets the backgroundBannerURL and promotionalContentId content item properties using the values specified for the top-level category’s heroImage and feature properties.

Note: A category’s feature and myFeature properties work together to ensure that a promotional content item is always returned for a category. For more information on these properties, see the Product Catalog chapter.

Note: If the CatalogNavigationService class returns null for the current category and top-level category IDs, it means that the CategoryHeaderBanner has been incorrectly placed on a page other than the Category Page and the cartridge should not be rendered. The CategoryHeaderBanner component tests for this situation and handles it appropriately.

To do its tasks, the CategoryHeaderBanner component has two configurable properties:

  • catalogTools: This property specifies which CatalogTools component the CategoryHeaderBanner component should use to access product catalog data. Out of the box, this property is set to /atg/commerce/catalog/CatalogTools.

  • storeCartridgeTools: This property specifies which StoreCartridgeTools component the CategoryHeaderBanner component should use to access the CatalogNavigationService cache. Out of the box, this property is set to /atg/endeca/assembler/cartridge/StoreCartridgeTools.

The CategoryHeaderBanner component also inherits a number of properties from the /atg/endeca/assembler/cartridge/handler/NavigationCartridgeHandler component, through a $basedOn property configuration. Specifically, CategoryHeaderBanner inherits a reference to the /atg/endeca/assembler/cartridge/manager/NavigationState component that provides information on the shopper’s current navigation state.


Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices