Skip to main content
Level 3
September 2, 2022
Beantwortet

AEM react - Content/Experience Fragment Component

  • September 2, 2022
  • 4 Antworten
  • 1258 Ansichten

How to extend the Content/Experience Fragment Component from wcm core components? Is there a tutorial or a repo that explains how to go about doing so?

Dieses Thema wurde für Antworten geschlossen.
Beste Antwort von Sachin_Arora_

@juanec2 Basically if the OOTB model of core component is not providing you the functionality as per your requirement, you can override it using delegation pattern. 

Refer this link which explains the concept nicely

https://levelup.gitconnected.com/aem-extend-core-component-models-using-resource-type-association-and-delegation-b8855ed281e2

 

4 Antworten

Sachin_Arora_
Community Advisor
Community Advisor
September 4, 2022

Yes @juanec2 there is a repository and tutorial that explains the concept of how to extend core components and it should be applicable for all.

Document : https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/spa-editor/react/extend-component.html?lang=en

Repository with Samples : https://github.com/adobe/aem-guides-wknd-spa/tree/React/latest

High Level Steps :

  • Inheritance with Sling Resource Super Type
  • Extend dialog
  • Implement SPA Component
  • Add Java Interface and Implement Sling Model

 

JuanEc2Autor
Level 3
September 7, 2022

@sachin_arora_ Hi I have created 

  • Inheritance with Sling Resource Super Type
  • Extend dialog
  • Implement SPA Component

But do not know how to tackle implementing the Java Interface/Implementation. Can you explain a little more on how to do so for a core component.

 

I have made interfaces/implementations with other components but I have not been successful with the Core Components yet. 

Sachin_Arora_
Community Advisor
Community Advisor
September 13, 2022

@juanec2 Basically if the OOTB model of core component is not providing you the functionality as per your requirement, you can override it using delegation pattern. 

Refer this link which explains the concept nicely

https://levelup.gitconnected.com/aem-extend-core-component-models-using-resource-type-association-and-delegation-b8855ed281e2

 

Leela-Pavan-Kumar
Level 4
September 5, 2022