Adding a CMS Populator Without Replacing Existing Ones

sap-commerce

The SAP docs for adding a custom CMS component populator show a mapMergeDirective approach that replaces all existing populators for that item type. If you only want to add your populator alongside the existing ones, use a composite populator with list merge="true":

<bean id="cmsCustomComponentItemTypePopulatorsMap" parent="cmsCompositePopulator">
    <property name="populators">
        <list merge="true">
            <ref bean="defaultCustomComponentContentPopulator"/>
            <!-- your custom populator -->
            <bean class="...CustomComponentContentPopulator"/>
        </list>
    </property>
</bean>

<bean depends-on="cmsContentItemTypePopulatorsMap" parent="mapMergeDirective">
    <property name="key" value="CustomComponent"/>
    <property name="value" ref="cmsCustomComponentItemTypePopulatorsMap"/>
</bean>

You still need to include the default populators (like AbstractCMSComponentContentPopulator and CMSItemLinkToggleDataToModelPopulator) in the list, or they won't run.