Expand my Community achievements bar.

SOLVED

Dynamic datasource in multifield

Avatar

Level 4

Hello All - I have a tab with multifield section in the page-properties with three fields.

 

  1. PathField for page/fragment selection
  2. Dropdown for datasource - Should dynamically populate this dropdown based on field 1.
  3. Hidden field to capture the dropdown selection value

Basically I wanted to show all the previously selected values in the dropdown on edit of the page property. I can make an ajax call and pass the selected value in the field 1 to the servlet to populate the dropdown but I wanted to use it a datasource.

 

Is there any way to pass the multifield - field 1 value to datasource using some listeners in the dialog node and populate the dropdown and hidden value. This should work for edit of the page properties as well without creating a separate clientlib and making Ajax call.

 

Please let me know if this is feasible approach or any better solution to handle this.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

datasource are static and values are populate on page load.

You have to use ajax call here e.g. https://aemlab.blogspot.com/2022/01/aemaacs-touch-ui-dialog-dynamic-dropdown.html 



Arun Patidar

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi,

datasource are static and values are populate on page load.

You have to use ajax call here e.g. https://aemlab.blogspot.com/2022/01/aemaacs-touch-ui-dialog-dynamic-dropdown.html 



Arun Patidar