Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

AEM6.5 How to pass the value from Touch Ui Dialog\'s Select field to Datasource script of another Select

Avatar

Level 8

Hi ,

We are using aem6.5 for touch ui dialog .

Could you provide input as how the below could be resolved

 

In the Touch UI dialog, I have two 'select' components(say Select 1, and Select 2) and Select 2 get dynamically populated using the Datasource.

Here is how they are supposed to work:

A. User can select an business value (best-business OR no-business) from Select 1
B. Based on the user selected value from above, the selected value needs to be passed to datasource servlet using /bin/project/List of Select 2.

Question: How to pass the selected value of select 1 to a Datasource resourceType of Select 2 ?

 

<business
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
emptyText="Please select a option"
fieldLabel="Select the Business:"
name="business"
required="{Boolean}true">
<items jcr:primaryType="nt:unstructured">
<ecomm
jcr:primaryType="nt:unstructured"
text="best Business"
value="best-business"/>
<necomm
jcr:primaryType="nt:unstructured"
selected="{Boolean}true"
text="No Business"
value="no-business"/>
</items>
</business>
<appIds
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
emptyText="Please select a option"
fieldLabel="Select App :"
name="appId"
required="{Boolean}true">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="/bin/project/List"/>
</appIds>

 

 

 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@srinivas_chann1 I am not sure if I am getting your use case correctly. 

If Option 2 list is depend on option 1 list, why cant you make a ajax call on the selection of option1 and accordingly dynamically populate List2. 

Something like given in below ref:

Experiencing Adobe Experience Manager (AEM, CQ): AEM 61 - TouchUI Add Items to Multifield based on S...

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@srinivas_chann1 I am not sure if I am getting your use case correctly. 

If Option 2 list is depend on option 1 list, why cant you make a ajax call on the selection of option1 and accordingly dynamically populate List2. 

Something like given in below ref:

Experiencing Adobe Experience Manager (AEM, CQ): AEM 61 - TouchUI Add Items to Multifield based on S...

Avatar

Community Advisor

@srinivas_chann1 I also think the solution provided by @Nitin_laad is the right one. You can write an AJAX call on the selection change of the first dropdown and it should populate the second dropdown. 

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now