@childresource in sling Model for multifield | Community
Skip to main content
manikanthar1295
Level 5
November 22, 2021
Solved

@childresource in sling Model for multifield

  • November 22, 2021
  • 2 replies
  • 6592 views

Hi Team,

 

I have to create Multifield for that i will use SlingModel.

Now how i can use @childresource to get the resource in sling model.

If any one create done multifield with child resource annotation plz share the code  it will be useful for me to understand.

 

Regards

Manikantha R

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 Kiran_Vedantam

Hi @manikanthar1295 

 

Check my blog for your query:

https://allaembykiran.wordpress.com/2021/09/06/sling-model-retrieving-properties-of-child-resources/

 

Check my other blog for multi field:

https://allaembykiran.wordpress.com/2021/01/13/nested-multi-field/

 

Hope this helps.

 

Thanks,

Kiran Vedantam

2 replies

Kiran_Vedantam
Community Advisor
Kiran_VedantamCommunity AdvisorAccepted solution
Community Advisor
November 22, 2021
manikanthar1295
Level 5
November 22, 2021

Hi Team,

 

This is way where i am getting child resource

Resource resource=componentResource.getChild("customerDetals");

 

But how i can use @Childresource annoattaon in this scenario.

 

Regards

Manikantha R

Kiran_Vedantam
Community Advisor
Community Advisor
November 22, 2021

Hi @manikanthar1295 

 

Check the blog here for an example: https://aem4beginner.blogspot.com/sling-annotations-in-aem

 

Thanks,

Kiran Vedantam.