Calling a sling servlet from Coral3 based Select dialog field
Hi All,
We are in the process of converting classic UI dialogs to Touch UI compatible. Whereas few of our components are having select fields (dialog item options) which are getting populated from a servlet response (JSON)
For example, in our classic UI dialog we were calling the servlet as highlighted in the below snap:

Is there any way to make use of the same servlet by calling it from some property? in Coral3 based touch UI select field? I have tried doing something like as follows, but looks like my servlet call is not happening as per logs:
<lineType
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
fieldLabel="Choose Contacts"
name="./selector">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="/bin/eventcontacts.json"/>
</lineType>
Yes, I have gone through various forums and found that there are multiple ways to achieve this. For instance:
- Using WCMUsePojo as explained in the following article: Building Experience Manager Components using Granite/Coral Resource Types
- Or even by creating a JS and calling my servlet via ajax call under "dialog-ready" and binding the response to dom elements
My question is: Is it not feasible to call a servlet directly from my dialog properties in case of Touch UI Coral3? or am I missing anything?
Thanks in advance for any pointers!
-Dinesh kumar L.