AEM Code Snippets : How to read child nodes in aem ?

Posted in AEM Code Snippets, AEM Tutorials By Raj On October 9, 2017

How to read child nodes of multifield control or any node using Sling models and WCMUsePojo class, this is just code snippet’s not going to talk anything theoretically if you want to have conceptual knowledge I suggest you read either or my other article’s, for sling models refer my other aticle custom list collection component using sling models

Node Structure

The below image talks about how the content is stored in CRX



Iterate child node with sling models

Iterate child node using Java 8 Lambda expression without sling model’s

Finally, call the ListCollection handler in the sightly template 



  • Dillip

    Can we have some sample Mockito Junit test cases for Sling Sevlet and as well as Osgi Sevices.