Highlighted

How to set root path of tagpicker dynamically on dropdown change

Avatar

Avatar

ashisht85509954

Avatar

ashisht85509954

ashisht85509954

17-04-2018

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.

Replies

Highlighted

Avatar

Avatar

Hemant_arora

Avatar

Hemant_arora

Hemant_arora

17-04-2018

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

Highlighted

Avatar

Avatar

Hemant_arora

Avatar

Hemant_arora

Hemant_arora

18-04-2018

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

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

Highlighted

Avatar

Avatar

ashisht85509954

Avatar

ashisht85509954

ashisht85509954

18-04-2018

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.

Highlighted

Avatar

Avatar

Hemant_arora

Avatar

Hemant_arora

Hemant_arora

18-04-2018

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.