How can I dynamically populate fields located in a component dialog | Community
Skip to main content
smacdonald2008
New Participant
October 16, 2015
Solved

How can I dynamically populate fields located in a component dialog

  • October 16, 2015
  • 1 reply
  • 817 views

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? 

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

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

1 reply

smacdonald2008
smacdonald2008AuthorAccepted solution
New Participant
October 16, 2015

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