Hi, I am facing issue while capturing value from dropdown in AEM.
The value are stored but the words after space is ignored.
e.g.- If "united states" is selected then only "united" is stored in the variable and "states" is ignored
please help me find the cause of it and how to fix it
Solved! Go to Solution.
Views
Replies
Total Likes
I am using acs commons generic list to populate options within coral3 dropdown.
Here is my touch ui country field node -
datasource node -
Generic list options [Key, value pairs] -
Based on selection united states/south korea is getting persisted as shown below -
I believe you are populating the options using datasource, then please let us know what are you getting against 'value' key as shown below -
@rahul234dabas , I would suggest to use values without spaces in it but it should still work with spaces.
Please find below sample dialog.xml and it works for me.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="Test Component"
sling:resourceType="cq/gui/components/authoring/dialog">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/tabs">
<items jcr:primaryType="nt:unstructured">
<noAgents
jcr:primaryType="nt:unstructured"
jcr:title="Test"
sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<datatype
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
fieldLabel="Select country"
name="./dataType">
<items jcr:primaryType="nt:unstructured">
<usa
jcr:primaryType="nt:unstructured"
text="United States"
value="united states"/>
<germany
jcr:primaryType="nt:unstructured"
text="Germany"
value="germany"/>
</items>
</datatype>
</items>
</column>
</items>
</noAgents>
</items>
</content>
</jcr:root>
Saved Data:
Hope this helps.
sorry @Siva_Sogalapalli this is not what I am looking for ....I am populating dropdown values dynamically and from there on the values after spaces are being ignored...the way that you have showed works perfectly but I am looking for something else.
Thank you
I am using acs commons generic list to populate options within coral3 dropdown.
Here is my touch ui country field node -
datasource node -
Generic list options [Key, value pairs] -
Based on selection united states/south korea is getting persisted as shown below -
I believe you are populating the options using datasource, then please let us know what are you getting against 'value' key as shown below -
Views
Likes
Replies
Views
Likes
Replies