Populate items in the dialog for filtering a list from content node | Community
Skip to main content
RitendraS11
Level 4
October 16, 2022
Solved

Populate items in the dialog for filtering a list from content node

  • October 16, 2022
  • 2 replies
  • 785 views

Hi Team,

 

I have data kept in a content node (content/test) and this node has multiple nodes with the name of Item_ID with similar values in jcr:content node (Title, Subtitle, link etc).

 

I can show all items on the UI by accessing the data using an OSGI service. Now, I want to add a feature for the AEM authors to filter the list from the component's dialog and show the items based on their needs and not the full list of items.

 

So, I want to populate all item's IDs as a dropdown in the dialog for the author to select whatever they want to show on the component's UI markup.

 

Is there a recommended way to implement this? OR any existing code sample, which can be referred to for this requirement?

 

Thanks in advance!

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 Saravanan_Dharmaraj

You can check this blog on how to populate the dialog dropdown with ID using a resource type servlet.The servlet will basically read the nodes under /content/test and gives the json.

The dialog can use the json as datasource through servlet to populate it.

 

https://aemlab.blogspot.com/2019/07/aem-touch-ui-dropdown-from-json.html

 

Similar one : http://www.sgaemsolutions.com/2019/01/dynamically-populate-drop-down-values.html

 

2 replies

Saravanan_Dharmaraj
Community Advisor
Saravanan_DharmarajCommunity AdvisorAccepted solution
Community Advisor
October 16, 2022

You can check this blog on how to populate the dialog dropdown with ID using a resource type servlet.The servlet will basically read the nodes under /content/test and gives the json.

The dialog can use the json as datasource through servlet to populate it.

 

https://aemlab.blogspot.com/2019/07/aem-touch-ui-dropdown-from-json.html

 

Similar one : http://www.sgaemsolutions.com/2019/01/dynamically-populate-drop-down-values.html

 

RitendraS11
Level 4
October 17, 2022

Thanks Saravanan, I found the same references and used to resolve my problem statement.

HeenaMadan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
October 17, 2022