An AEM author selects drop-down values during design time. For example, an author can select a country from the drop-down field, as shown in this illustration.
You can populate a drop-down field by using a com.adobe.granite.ui.components.ds.DataSource object. For information, see DataSource.
Furthermore, you can create this object in a Java WCMUsePojo class and use HTL to invoke it. That is, get the values defined in the DataSource object. Finally, you can bind the resource type of the HTL code to the dialog node that represents the drop-down field.
This development article steps you through how to use a DataSource object, a Java Map collection object, and HTL to populate a drop-down field in an AEM 6.3 component.
To read this development article, click https://helpx.adobe.com/experience-manager/using/aem63_datasource.html
No comments:
Post a Comment
If you have any doubts or questions, please let us know.