There's a dialog field that consists of a text field where we have to enter an ID. There's a select dropdown field which renders the values from the API which required the ID as a parameter.
Is there a way to populate the dropdown list dynamically when the ID is authored , on field change, without submitting the dialog twice?
Solved! Go to Solution.
Views
Replies
Total Likes
I think this fits your use case. Let me know if you any questions.
https://aemlab.blogspot.com/2022/01/aemaacs-touch-ui-dialog-dynamic-dropdown.html
Should I write an ajax in the listner js and trigger the servlet?
Views
Replies
Total Likes
I think this fits your use case. Let me know if you any questions.
https://aemlab.blogspot.com/2022/01/aemaacs-touch-ui-dialog-dynamic-dropdown.html
Hi @JeevanRaj ,
Thank you for your help. It's working as expected even when the input is a text field.
Views
Replies
Total Likes
Instead of entering an ID in the text field which requires to submit dialog to save content in jcr, unless written some custom script to listen the text field values, i would suggest to go with selection of values from first dropdown which dynamically populates the values in the second dropdown
Here are few examples to check -
https://kiransg.com/tag/datasource/
https://adapttoaem.blogspot.com/2021/02/setting-dynamic-dropdownselect-value-in.html
Hope this helps
Thanks
Hi @PRATHYUSHA_VP ,
We are using text field because if the select dropdown field is used, the list is very long and may cross 100 items.
The solution worked with the first field as text. Thank you for your help.
Views
Replies
Total Likes