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

Deep diving into Sling models PT3 | AEM Community Blog Seeding

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,168 likes

Total Posts

6,289 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,168 likes

Total Posts

6,289 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

28-06-2020

BlogImage.jpg

Deep diving into Sling models PT3 by digitalum

Abstract

In this blog post I will show you how you can leverage the power of Apache Sling to decrease your development effort when you are tasked with building basic components.

What we have been doing wrong
What do you do when you are given the task to build a pretty standard component with a basic dialog to save some properties on a given node and use those properties within your HTL?

You build your dialog, your HTL and when you start working on your model, you will see that you must write some very basic Java to inject those JCR properties into the properties of your Java class. You can do this either by using annotations or in some PostConstruct method and provide the appropriate getters for them.

Now this can be a very tedious task, because if you’ve read the first blog of this series, you must:
1. define a very basic interface
2. create an implementation class for it
3. annotate the implementation class
4. write your unit tests for some basic getters (because that’s what we all do, right? #codecoverage).

Read Full Blog

Deep diving into Sling models PT3

Q&A

Please use this thread to ask the related questions.

AEM AEMEBlogSeeding Experience Manager