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

Deep diving into Sling models PT3 | AEM Community Blog Seeding

kautuk_sahni
Community Manager
Community Manager

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.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies