@childresource in sling Model for multifield | Community
Skip to main content
manikanthar1295
Level 5
Nov 22, 2021 8:14 AM UTC
Solved

@childresource in sling Model for multifield

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.
Kiran_Vedantam
Kiran_VedantamAccepted solution
New Participant
Nov 22, 2021 8:51 AM UTC

3 replies

manikanthar1295
Level 5
Nov 22, 2021 9:05 AM UTC

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

Translate
Kiran_Vedantam
New Participant
Nov 22, 2021 9:11 AM UTC

Hi @manikanthar1295 

 

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

 

Thanks,

Kiran Vedantam.

Translate
Kiran_Vedantam
Kiran_VedantamAccepted solution
New Participant
Nov 22, 2021 8:51 AM UTC

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

Translate