Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Dynamically populate selection dropdown in a dialog with a datasource using JSON

Avatar

Level 3

Hi ,

 

I want to create a "Dynamically populate selection dropdown in a dialog with a datasource using JSON" have any perfect reference please ping me how to do step wise function.

1 Accepted Solution

Avatar

Correct answer by
Employee
5 Replies

Avatar

Correct answer by
Employee

Avatar

Level 8

@keshava219  You can create datasource node structure with sling:resourceType of datasource as sling:resourceType (String) = /bin/dropdownList ( i.e. Path of the servlet implementing the data source for dynamic value). It will give the desire result of a dynamic dropdown as you can see below the screenshot.

shaileshbassi_0-1657031259172.jpeg

 

    

shaileshbassi_1-1657031259273.jpeg

 

For DataSource Servlet (/bin/dropdownList) Implementation you can refer to below articles:

https://redquark.org/aem/day-17-granite-datasources/ 

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

Hope this helps

Thanks

Avatar

Level 3

hi @shaileshbassi,

 

                 Thanks, this was helpfull But  I want to pass along with parameters as well to servlet from dialog which author mention

Example 

keshava219_0-1657196305176.png

 

             On dialog  i have numerical number i want to pass to servlet  this value  possible?