On select dynamically update Touch UI Dialog | Community
Skip to main content
Level 3
Jan 10, 2018 12:37 PM UTC
Solved

On select dynamically update Touch UI Dialog

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

kumar4585
New Participant
Jan 19, 2019 9:28 AM UTC

hi,

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

Translate
mahdern11613285
New Participant
Jun 8, 2018 7:31 PM UTC

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

Translate
Level 3
Jan 10, 2018 6:14 PM UTC

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....

Translate
Level 3
Jan 10, 2018 4:54 PM UTC

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

Translate
smacdonald2008
Level 10
Jan 10, 2018 3:05 PM UTC

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.

Translate
Level 3
Jan 10, 2018 3:01 PM UTC

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.

Translate
smacdonald2008
Level 10
Jan 10, 2018 1:25 PM UTC

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.

Translate
smacdonald2008
Level 10
Jan 10, 2018 1:23 PM UTC

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

Translate