Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Need to get the child resouce value from sling model

Avatar

Avatar
Validate 1
Level 1
ramyam4366005
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
ramyam4366005
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
ramyam4366005
Level 1

10-05-2019

Hi I have a node and child nodes for a component. the no of properties needs to saved is more so i am saving with as child node of the resource node.

structure below.

1750832_pastedImage_0.png

the properties are saved in q1, q2, q3 ect.....my resource questionnaire node. we are using SPA framework with react and AEM.

need to expose the values of q1 and its properties , q2 and it's properties using sling model....right now i can get the properties only for the resources.

Can anyone suggest me how to get the properties in sling models.

please let me know the way to render the property values for q1 ,q2 nodes using sling models. I use code snippet shown belowGone through many sling model articles but not finding how to achieve this.

@Model(

        adaptables = {SlingHttpServletRequest.class,Resource.class },

        adapters = {ComponentExporter.class},

        resourceType = Footer_Imglinks .RESOURCE_TYPE

)

@Exporter(

        name = ExporterConstants.SLING_MODEL_EXPORTER_NAME,

        extensions = ExporterConstants.SLING_MODEL_EXTENSION

)

public class Footer_Imglinks implements ComponentExporter {

     private static final Logger LOGGER = LoggerFactory.getLogger(Footer_Imglinks.class);

    static final String RESOURCE_TYPE = ".../components/questionnaire";

   

 

Thanks,

Ramya

Replies

Avatar

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

270 likes

Total Posts

1,101 posts

Correct Reply

180 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

270 likes

Total Posts

1,101 posts

Correct Reply

180 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile
Mayank_Gandhi
Level 10

14-05-2019

smacdonald2008​ I guess this should be in AEM core. Can you please help?

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

14-05-2019

See this article - it will point you in the correct direction:

Adobe Experience Manager Help | Working with Sling Models in Adobe Experience Manager

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

14-05-2019