hi all,
in the dialog I have tag picker and dropdown with datasource.
I need to populate dropdown with list of child tags for the parent tag selected in tag picker.
What I haven't managed to figure out is how to read dialog props. from datasource handler class.
I tried with sling model and with WCMUsePojo.
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
The change event should work with tag picker as well. Please let me know if eventing does not work.
Hi,
You need to convert datasource from sling model to servlet and populate dropdown based on parent value via making a ajax call to datasource servlet with parent tag.
e.g. https://github.com/arunpatidar02/aem63app-repo/blob/master/js/dynamic-dropdown.js
Hi,
Please checkout my blog on same https://aemlab.blogspot.com/2022/01/aemaacs-touch-ui-dialog-dynamic-dropdown.html
Thank you Arun.
This looks like my use case, I'll check it out and let you know if I have additional questions.
Bottom line is I should use approach from your second link to get value from first component and use servlet to get list of tags to populate dropdown.
Is there other handler for oob tag picker (cq/gui/components/coral/common/form/tagfield), I believe applying class to tag picker will not be applied and also I think change event will not be triggered by tag picker changes ?
$document.on("change", contentTypeSelector, function (e) {
setSubTypeDropdown(false);
});
Thank you
Happy new year.
Hi,
The change event should work with tag picker as well. Please let me know if eventing does not work.