How to set root path of tagpicker dynamically on dropdown change | Community
Skip to main content
ashisht85509954
Level 2
April 18, 2018

How to set root path of tagpicker dynamically on dropdown change

  • April 18, 2018
  • 2 replies
  • 3449 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Hemant_arora
Level 8
April 18, 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

ashisht85509954
Level 2
April 18, 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.

Hemant_arora
Level 8
April 18, 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.