DEV Community

Integrating a modern frontend in a multi tenant AEM project (part 1)

Natalia Venditto on June 19, 2019

I felt it was about time I found a moment to write this article. I am sure that more than one frontend developer (especially in the role of tech le...
Collapse
 
pgangwani profile image
pgangwani

I am using spa template given by adobe. Currently stuck with integrating parsys in column control or layout grid component. Can you help ?

Collapse
 
thomasjithin profile image
Jithin Thomas

Hi Pavan, Nice to meet again, were you able to handle the nested component in SPA framework ? I've gone through your code. Were you able to handle this usecase, i would like to get more info about this. - Jithin

Collapse
 
anfibiacreativa profile image
Natalia Venditto

I would love to, but I am afraid I need a bit more information to be able to help...

Collapse
 
pgangwani profile image
pgangwani

I am following this template --> helpx.adobe.com/in/experience-mana...

I have usecase to create nested components using grid (column control) which loop over equal size cell , now each cell should have "drag component" aem parsys so that any component can be added.
So I want pointers for such example. Unfortunately, Adobe's doc's are unclear for this usecase.

Can you help ?

If you need any further sharing of code leme know or any other pointers.

Thnaks in advance

Thread Thread
 
anfibiacreativa profile image
Natalia Venditto

Hi, I would definitely need more information. What does exactly not work for you. Column control implements a parsys or responsivegrid component inside of each partition, so to speak. You should have a policy defining the components allowed in that container.

Thread Thread
 
pgangwani profile image
pgangwani

That where I need help to refer some example.

Thread Thread
 
anfibiacreativa profile image
Natalia Venditto

Do you have this code somewhere I could see? Like in a public repo?

Thread Thread
 
pgangwani profile image
pgangwani • Edited

give me 1 hr , leme clone the repo and remove internal stuff before sharing.

Thread Thread
 
anfibiacreativa profile image
Natalia Venditto

github -> @anfibiacreativa

Thread Thread
 
pgangwani profile image
pgangwani

Here you go: github.com/pgangwani/aem-react-pre...

Pl check column control: It should include childcomponents as added in comment

Thread Thread
 
pgangwani profile image
pgangwani

Added you as collaborator , can push directly if you found any thing fishy or small mistake

Thread Thread
 
pgangwani profile image
pgangwani

Hello Natalia, did you get chance to check the code ?

Thread Thread
 
anfibiacreativa profile image
Natalia Venditto

Hi :) No, it may take a bit. Unfortunately, it is a week with a lot of work for me ;)Thanks for being patient.

Thread Thread
 
pgangwani profile image
pgangwani

Thanks for letting me know. I can wait... :)

Thread Thread
 
pgangwani profile image
pgangwani

Hello Natalia, were you able to access the code

Thread Thread
 
anfibiacreativa profile image
Natalia Venditto

Hi Pawan. Today I had a little time to quickly take a look but your issue is not with AEM per se (as this article describes a modern yet independent to AEM Frontend Setup) but with the React implementation in the context of AEM SPA editor. So I am not sure I can help there. According to this npmjs.com/package/@adobe/cq-react-... You should be extending ResponsiveGrid and implementing something like { super.childComponents } inside of your div.

Thread Thread
 
anfibiacreativa profile image
Natalia Venditto

"Container.childComponents()
Returns the child components of this Container. It will iterate over all the items and instantiate the child components if a Mapping is found Instantiation is done my connecting the Component with the data of that item"

Thread Thread
 
pgangwani profile image
pgangwani

I tried that too , didn't work. Do you have AEM 6.5 ? Can you try and share the screen shot of console of printing child components. When I checked I got empty array. 🙄

Thread Thread
 
gopikrishna123 profile image
G.K.

@pgangwani Do you have any update on this Usecase, I have tried the same and getting CQItems as empty array, when I try to use Model to get dialog values. Please let me know if you have solution on this. thanks in advance!!

Collapse
 
ahmedmusallam profile image
Ahmed Musallam

Nice to see some AEM content on dev.to!!! Way to go!

I’ve contemplated posting AEM content here, but I always stop at the fact that there might not be an audience for it... plus I write most of that stuff on my employer’s site :)

Anyway! Awesome post! And would love to see more!!

Collapse
 
anfibiacreativa profile image
Natalia Venditto

Thank you. Second part, where I explain the actual webpack config and maven integration, coming next. :)

Collapse
 
ahmedmusallam profile image
Ahmed Musallam

Ah, you should make use of this: dev.to/ben/changelog-create-series...

Collapse
 
ashokajin profile image
ashokAjin

We are using native JavaScript and es6 features.
Page renders on server and only dynamic events are handled at front-end. Which is mostly static and is rendered on server. what folder structure we have to follow. pls do let me know

Collapse
 
munikmca profile image
Muneeswar Reddy

Very good article! Very well articulated.

Collapse
 
anfibiacreativa profile image
Natalia Venditto

Thank you. Part II is almost ready, so stay tuned!