Expand my Community achievements bar.

SOLVED

Sling model Delegate in SPA project

Avatar

Level 2

A sling model delegate was added for page and XF components similar to as in the example given in this blog - https://levelup.gitconnected.com/aem-extend-core-component-models-using-resource-type-association-an...

 

Now while including an SPA Project to the same AEM instance, SPA Page model delegate in turn delegates to Page core component as in link. Though the resource type is different, earlier mentioned sling model delegate for page is always invoked by SPA Page model. Anyone faced such a scenario, pls guide.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @ramya726 ,

The resolution and the management of the page model is delegated to a provided PageModel library. The SPA must use the Page Model library to be initialized and be authored by the SPA Editor. The Page Model library provided indirectly to the AEM Page component via the aem-react-editable-component npm. The Page Model is an interpreter between AEM and the SPA and therefore always must be present. When the page is authored, an additional library cq.authoring.pagemodel.messaging must be added to enable the communication with the page editor.


For more details on it you can check below link
https://experienceleague.adobe.com/en/docs/experience-manager-65/content/implementing/developing/spa...


Thanks
Tarun

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @ramya726 ,

The resolution and the management of the page model is delegated to a provided PageModel library. The SPA must use the Page Model library to be initialized and be authored by the SPA Editor. The Page Model library provided indirectly to the AEM Page component via the aem-react-editable-component npm. The Page Model is an interpreter between AEM and the SPA and therefore always must be present. When the page is authored, an additional library cq.authoring.pagemodel.messaging must be added to enable the communication with the page editor.


For more details on it you can check below link
https://experienceleague.adobe.com/en/docs/experience-manager-65/content/implementing/developing/spa...


Thanks
Tarun