Expand my Community achievements bar.

How to set root path of tagpicker dynamically on dropdown change

Avatar

Level 2

I have a requirement where i need to set root path of the tagpicker based on dropdown values. I am using AEM6.3 with sp2.

4 Replies

Avatar

Level 9

Can you elaborate the requirement ?

Do you want the tagpicker to open a specific category of tags  or something else?

You can set rootPath property in your dialog to directly open a category of tags

Avatar

Level 9

Also refer to https://forums.adobe.com/thread/2326844

you may also try overlaying /libs/cq/tagging/widgets/source/widgets/TagInputField.js

Avatar

Level 2

Hi Hemant,

Requirement is-

I have one drop down and one tag picker in my dialogue. Root path of tag picker depends on drop down value, so when i change the value of drop down root path of tag picker should be change accordingly and when i click on tag picker it should point to the appropriate root path.

E.g.

1. Drop down has list of countries.

2. Tag picker shows the list of languages.

When i select country USA, then language tag picker should have root path as /etc/tags/language/us

When i select country India, then language tag picker should have root path as /etc/tags/language/ind

and so on.

I hope this clarifies the problem statement.

Avatar

Level 9

Add a listener to the dropdown which updates the rootPath property let this listner call some servlet which updates the cq:tags property of jcr:content node. you can use CQ http call in classic ui and a simple ajax call for touch ui listener.