AEM react - Content/Experience Fragment Component | Community
Skip to main content
Level 3
September 2, 2022
Solved

AEM react - Content/Experience Fragment Component

  • September 2, 2022
  • 2 replies
  • 1238 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by 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

 

2 replies

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

 

JuanEc2Author
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
Sachin_Arora_Community AdvisorAccepted solution
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