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
How to inject a sling model inside another sling model?
Avatar
Ignite 1
Level 1
Vanitha
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Validate 1
View profile
Vanitha
- Adobe Experience Manager
I tried as below, Model A: @Model(adaptables = SlingHttpServletRequest.class) public class ModelA { private String title; @inject Resource resource; ModelB modelb; . @PostConstruct public void init() { modelb = resource.adaptTo(ModelB.class); } } Model B: @Model(adaptables = SlingHttpServletRequest.class) public class ModelB { private String text; } But it's not working.

Views

91

Likes

0

Replies

1
SPA Angular - Sling model Exporters - How to add multiple resource type to a sling model exporter
Avatar
Ignite 1
Level 1
Vanitha
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Validate 1
View profile
Vanitha
- Adobe Experience Manager
We have a requirement, our sling model has been consumed by multiple components.Eg: GenericPageModel - This model has been included in several components Can someone help me solving this?

Views

53

Likes

0

Replies

1