On select dynamically update Touch UI Dialog | Community
Skip to main content
January 10, 2018
Solved

On select dynamically update Touch UI Dialog

  • January 10, 2018
  • 10 replies
  • 6007 views

Update the options of a drop down Touch UI Select according to the value of another Select .

I have a requirement like on select of a first drop down it should call a rest service and based on the first drop downselection its should populate the 2nd drop down dialog field . I am new to touch ui if anybody has already worked on this kind of requirement please help me 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.

10 replies

smacdonald2008
January 10, 2018

All drop-downs can be set using a DataSource object - i recommend you to go through this artilce to learn how to dynamically populate a select field -- Scott's Digital Community: Using an WCMUsePojo class to populate an Experience Manager Touch UI Select Field

smacdonald2008
January 10, 2018

SO in this example - you can use Java logic to set a DataSource object for the second Select field. But start with that artilce to learn how to populate a Select field via code.

January 10, 2018

Hi Scott,

can u please let me know how can i populate 2nd drop down on select of 1st drop down .correct me if i am wrong this above link only work after submit the dialog, does it work for on select of 1st  drop down to auto-populate for 2nd drop down.

smacdonald2008
January 10, 2018

We have have to write a custom event handler that is fired to back-end service when the 1st drop down is selected.  I will discuss and get back to you.

January 10, 2018

Thanks Scott for sharing the above links ill check all these links and let you know.

January 10, 2018

Hi Scott/Sreekanth,

http://experience-aem.blogspot.com/2015/04/aem-6-sp2-touchui-adding-dynamic-select-options .html

The above link nicely working for me in 6.3 i will use this for my requirement.Thanks a lot....

mahdern11613285
June 8, 2018

Hi Scott/Sreekanth,

http://experience-aem.blogspot.com/2015/04/aem-6-sp2-touchui-adding-dynamic-select-options .html

is not working in AEM 6.2.

Here are some of the issues:

1. A warning "An instance of Select is already attached to the specified target element. Future versions of CoralUI will throw an exception at this point."

2. capital._select.val(event.selectedValue).trigger('change'); - TypeError: capital._select.val is not a function

Thanks,

Mahder

kumar4585
January 19, 2019

hi,

i need a sling model example to populate 2nd drop down list auomatically click on 1st one...please...thanks in advance