Selection Dropdown values dynamically. | Community
Skip to main content
Mani_kumar_
New Participant
March 14, 2016
Solved

Selection Dropdown values dynamically.

  • March 14, 2016
  • 11 replies
  • 6711 views

Hi All,

We have requirement where we need configure the pagepath in dialog and display list of component names in selection dropdown.

attaching screenshot.

Thanks,

Mani Kumar K

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 Mani_kumar_

Hi All,

Got the solution please find below code snippet

function(){ 
var dialog = this.findParentByType('dialog');
var selectBox = dialog.findByType('selection')[0];
        $.getJSON('/libs/dropdown?Path=' + this.value, 
            function(jsonData){
                        selectBox.setOptions(jsonData);
                        });
 }

11 replies

edubey
New Participant
March 14, 2016

1. Have a simple widget listener on pathfield, which will call a servlet.

2. have a servlet which returns all component used in this page and populate drop down with the data returned via servlet [1]

[1] https://helpx.adobe.com/experience-manager/using/dialog_fields_servlets.html