Deep diving into Sling models PT3 | AEM Community Blog Seeding | Community
Skip to main content
kautuk_sahni
Community Manager
Community Manager
June 29, 2020

Deep diving into Sling models PT3 | AEM Community Blog Seeding

  • June 29, 2020
  • 0 replies
  • 1052 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.