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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Vanitha
Community profile Vanitha Level 1
Job title here
Location here
2 BADGES
Level 1

Level 1

Learn more
Joined the community 30-10-2020 6:57:45 PM
Offline
Top badges earned by Vanitha
Customize the badges you want to showcase on your profile
Re: How to inject a sling model inside another sling model?
Avatar
Boost 10
Level 2
piotrr32520682
Level 2

Likes

10 likes

Total Posts

5 posts

Correct reply

3 solutions
Top badges earned
Boost 10
Give Back 3
Affirm 3
Give Back
Ignite 1
View profile
piotrr32520682
- Adobe Experience Manager
Try this:@Model(adaptables = SlingHttpServletRequest.class) public class ModelA { private String title; @Self ModelB modelb; } Or if ModelB is adaptable only from Resource then@Model(adaptables = SlingHttpServletRequest.class) public class ModelA { private String title; @Self @Via("resource") ModelB modelb; }

Views

102

Likes

3

Replies

0
Re: SPA Angular - Sling model Exporters - How to add mult...
Avatar
Give Back 800
Community Advisor
Vijayalakshmi_S
Community Advisor

Likes

767 likes

Total Posts

855 posts

Correct reply

284 solutions
Top badges earned
Give Back 800
Affirm 250
Give Back 700
Give back 600
Give Back 500
View profile
Vijayalakshmi_S
- Adobe Experience Manager
Hi @Vanitha,When you say "GenericPageModel is included in several components", you mean it is instantiated via ModelFactory ?Could you please elaborate your use case.

Views

48

Like

1

Replies

0