Tuesday, 16 June 2015

Populating AEM Component Dialog fields using Sling Servlets

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


In this example, the movie titles that appear in the drop-down control are returned by an AEM Sling Servlet. This article walks you through how to create an AEM component that uses Sling Servlets to populate fields that appear in component dialogs. By hooking into a Sling Servlet, you can dynamically populate dialog fields. For example, you can code the Servlet to call an external web service, and populate a dialog field with the data returned by the external service.  

Join the Adobe Experience Cloud Community 

Join the Adobe Experience Cloud Community by clicking this banner

I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with 20 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.

TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeExpCare.

YouTube: Subscribe to the AEM Community Channel

Featured post

Adobe Experience Manager FAQs and other Tips