Utility Sling Model to expose N level Coral UI AEM Multi-field as JSON without using deprecated JsonItemWriter | AEM Community Blog Seeding | Community
Skip to main content
kautuk_sahni
Community Manager
Community Manager
May 19, 2020

Utility Sling Model to expose N level Coral UI AEM Multi-field as JSON without using deprecated JsonItemWriter | AEM Community Blog Seeding

  • May 19, 2020
  • 0 replies
  • 2076 views

BlogImage.jpg

Utility Sling Model to expose N level Coral UI AEM Multi-field as JSON without using deprecated JsonItemWriter by Ramachandra Pai

Abstract

With the introduction of Coral UI and Sling models, implementing an N level multi-field in AEM is no longer a difficult job. That too without using ACS Commons!

What are we going to achieve ❓
In this article, I will share an approach to build a three level nested multi-field (which can be extended to N level) and steps on how we can parse the same in our AEM component. The major issue that I wanted to tackle is writing a generic code to parse the multi-field as JSON without using the deprecated JsonItemWriter class and its dump method.

The use case is to display a hierarchy of country, state and city.

This approach is an extension of the one here. Please feel free to suggest improvements in terms of making the code generic and reusable. The code has been tested on AEM 6.4 GA. For AEM 6.3 you might need service pack 2 or more.

Read Full Blog

Utility Sling Model to expose N level Coral UI AEM Multi-field as JSON without using deprecated JsonItemWriter

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.