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

AEM: How to use nested Multifields in your components (using a Sling model vs pure HTL) | AEM Community Seeding

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,129 likes

Total Posts

6,140 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,129 likes

Total Posts

6,140 posts

Correct Reply

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

27-04-2020

BlogImage.jpg

AEM: How to use nested Multifields in your components (using a Sling model vs pure HTL) by Theo Pendle

Abstract

How to extract the values from a TouchUI nested Multifield using HTL or a model, and a comparison of both solutions

Adobe has a helpful tutorial on using a Multifield in a component. This tutorial is good to get the basics but it has two flaws. Firstly, it does not cover nested Multifields and secondly it is actually a bit wrong as it uses a hybrid HTL/Sling Model solution.
In this article, I will show you two ways of using the data from a nested Multifield in your component:
1. Using a java Sling Model
2. Using pure HTL (no model at all)

Creating the edit dialog
Whichever solution you wish to use, you will need a basic component with nested Multifield cq:dialog. So let’s create that now.
I will create my component under /apps/demo/components/content/demo. For now let’s just give it a very simple demo.html file:

Demo

Read Full Blog

AEM: How to use nested Multifields in your components (using a Sling model vs pure HTL)

Q&A

Please use this thread to ask the related questions.

AEM AEMEBlogSeeding Experience Manager