Hello everyone
I have a this node structure in my project :
Which contains all the countries, and each node country(like Afghanistan) contains the following properties:
And in my page I have a form option field which points to my list countries
And the form options display the property text of each country
What I would like to do is that I would like to create another form where I can display the “phone_text” property instead of the “text”, Is there any way to do it or I will have to create another list ?
Thanks in advance
Solved! Go to Solution.
Views
Replies
Total Likes
ok Thanks for displaying that. However for reading from same source node, please try to follow my previous suggestion..
I am not aware of something or some way that would make phone_text/phone/value as selectable by the datasource property unless we try to read it by backend, hence thought of servlet approach
Hi @odabio
How are you obtaining the dropdown values for country names in your form?
Following can be tried. There are examples of obtaining the options by pointing the 'datasource' node of the component to the desired servlet path which in turn returns the final desired dropdown options with key and value
<datasource jcr:primaryType="nt:unstructured" sling:resourceType="/apps/project/functiondropdowns" dropdownSelector="countries"/>
/apps/project/functiondropdown will call the servlet.
You can try similar approach by invoking the servlet and getting the dropdown values as country names or phone text/values based on the selection
See https://redquark.org/aem/day-17-granite-datasources/ for example. Call the servlet and return the desired text/values in json as per selection
This is how I'm obtaining my list (just config the source to list and in the list I point ot the list)
ok Thanks for displaying that. However for reading from same source node, please try to follow my previous suggestion..
I am not aware of something or some way that would make phone_text/phone/value as selectable by the datasource property unless we try to read it by backend, hence thought of servlet approach
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies