Expand my Community achievements bar.

Join expert-led, customer-led sessions on Adobe Experience Manager Assets on August 20th at our Skill Exchange.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Reading Child/Grand Child properties in Sling Model

Avatar

Level 2

Hi,

Is there any way we can access child/grand child valuemap in sling model.

Ex.  If my current resource is "/content/1/2"

And I would like to read property available at node "/content/1/2/x/y/5",  and x, y values may vary.

I found DeepModifiableValueMapDecorator,  will this help?

Thanks,

Raghava

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

you can inject self as reosurce and check other childs(grand childs) with java code using Resource API.

@Self

    private Resource resource;

Resource (Apache Sling 8 API)

Arun Patidar

AEM LinksLinkedIn

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

you can inject self as reosurce and check other childs(grand childs) with java code using Resource API.

@Self

    private Resource resource;

Resource (Apache Sling 8 API)

Arun Patidar

AEM LinksLinkedIn