Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!

AEM6.5 TOUCH UI multifield ,pass Select field value 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. Could you please provide sample code.

Tried with link http://experience-aem.blogspot.com/2016/02/aem-61-touchui-add-items-to-multifield-based-on-value-in-... but could not
resolve the issue as the multifield generates dynamic select values for each

We have multifield , In that we have 2 select field and one text field

 

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.
c. Also the text filed must be populated based on Select 1

Question: As this is multifield, How to pass the selected value of select 1 to a Datasource resourceType of Select 2 ?
As i see that it craetes different names for the already created selected 1 like ./appList/item0/business for 1 st multifiled and for 2nd
./appList/item1/business .. like that

 

<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<appsMapping
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
composite="{Boolean}true"
fieldLabel="Mapping Configuration">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container"
name="./appList">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<select1
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>
</select1>
<select2
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"/>
</select2>
<appLabel
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldLabel="App Label :"
name="appLabel"/>
</items>
</column>
</items>
</field>
</appsMapping>
</items>
</column>

 

Thanks

3 Replies

Avatar

Level 8

Hi,

I could not find the solution for multifield with 

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

 

From the link.

 

Could you please help as how this could be solved