Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

How can I dynamically populate fields located in a component dialog

Avatar

Level 10

I want to dynamically populate fields located in a component's dialog. For example, i want to invoke a 3rd party web service, retrieve  data and populate a drop-down list with data returned by the service. How can this be achieved? 

1 Accepted Solution

Avatar

Correct answer by
Level 10

You can invoke an Adobe Experience Manager (AEM) Sling Servlet to populate fields that appear in AEM component dialog. That is, instead of hard-coding values in JavaScript, you can populate a dialog drop-down using a Servlet's return value (for example, JSON data), as shown in the following illustration. 

[img]Drop-down.png[/img]

Populating AEM Component Dialog fields using JSON data returned by Sling Servlets

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

You can invoke an Adobe Experience Manager (AEM) Sling Servlet to populate fields that appear in AEM component dialog. That is, instead of hard-coding values in JavaScript, you can populate a dialog drop-down using a Servlet's return value (for example, JSON data), as shown in the following illustration. 

[img]Drop-down.png[/img]

Populating AEM Component Dialog fields using JSON data returned by Sling Servlets