Expand my Community achievements bar.

Who Me Too'd this topic

Avatar

Level 1

We had a requirement wherein it was required for us to do the customization of OOTB Breadcrumb CIF component. As OOTB Breadcrumb CIF component internally inherits Breadcrumb Core component, it was using Sling Delegation Pattern for the same. 

But now, when we tried to using the same logic and use Delegation Pattern for our custom breadcrumb component which inherits OOTB Breadcrumb CIF component, it has started to give us a Null object for the same. 

Below are the levels of inheritance we are following:

CustomBreadcrumbImpl <- CIF BreadcrumbImpl <- WCM BreadcrumbImpl

 

Below is the code snippet through which I am trying to access the object.

import com.adobe.cq.commerce.core.components.models.breadcrumb.Breadcrumb;

@Model(adaptables = SlingHttpServletRequest.class, adapters = { Breadcrumb.class,
CustomBreadcrumb.class }, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL, resourceType = "project/components/commerce/breadcrumb")
public class CustomBreadcrumbImpl implements CustomBreadcrumb {

@Deleted Account
@Via(type = ResourceSuperType.class)
private Breadcrumb customBreadcrumb;

 

Has anyone faced any such issues? Any idea how we can manage these kind of issues where three layers of inheritance is observed? 

Help would be much appreciated. Thanks. 

 

Who Me Too'd this topic