Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Unable to override the tagpicker.js in touch UI

Avatar

Level 1

Hi All,

We are trying to customize the tagpicker widget which is available OOTB (/libs/cq/gui/components/common/tagspicker) for our requirement as we don't use the AEM tags in our platfrom. As part of this change, we want to customize the type ahead available in the tagpicker to pull the tags from external system. To achieve this, we have tried overridding the file "/libs/cq/gui/components/common/tagspicker/clientlibs/tagspicker.js" by copying it to the apps folder as "/apps/cq/gui/components/common/tagspicker/clientlibs/tagspicker.js". To test the overridding, i have changed the result count to 10 from 50 in the file. I see the same change on the developer tools when i browse for the tagpicker.js. However,  the call that is going to pull the tags still have count set to 50. We strongly suspect that we might be refering to a wrong file.

We would really appreciate if someone can direct us to the right file which can be overriden to customize.

Thanks!

0 Replies

Avatar

Community Advisor

Hi,

You can't override js files like copying from libs to apps.

To referred custom js you need to go to js.txt file and changed the reference to your js file.

Please use ?debugClientLibs=true with URL to check individual files in browser console.

Thanks

Arun

Avatar

Level 1

Hi Arun,

Thanks for the inputs. After appeding the ?debugClientLibs=true to the URL, we were able to find out that the file that we were referring to was a wrong one.  Now, we have the below question.

We would like to customize the tagpicker widget that is available on the OOTB page template (/libs/foundation/components/page) to pull the search results from a servlet path instead of AEM tags folder. For which we see two tagpickers that are available.

  • /libs/cq/gui/components/projects/admin/translation/customsearch/pathbrowser/tagspicker
  • /libs/cq/gui/components/common/tagspicker

Could you please let us know which one need to be customized for our need. We see the "sling:resourceType" is mentioned as "cq/gui/components/common/tagspicker". However, the tagpicker.js is actually picked from the path "/libs/cq/gui/components/projects/admin/translation/customsearch/pathbrowser/tagspicker" and both have the same content.

Any inputs would be highly appreciated.

Thanks!

Sujeet Palepu

Avatar

Community Advisor

Hi,

I can't see any js file at /libs/cq/gui/components/projects/admin/translation/customsearch/pathbrowser/tagspicker/clientlibs

I am using AEM 6.3. Can you try to changes at  /libs/cq/gui/components/common/tagspicker and check if doesn't work let me know where you want changes for custom result. so that I can check and let you know the exact file.

Screen Shot 2018-07-14 at 12.01.41 AM.png

Thanks

Arun

Avatar

Level 1

Hi Arun,

My Bad. I would have mentioned the version of the AEM that we are using. We are on AEM 6.2 SP1. In the Libs folder we have the file "/libs/cq/gui/components/projects/admin/translation/customsearch/pathbrowser/tagspicker" which has a logic to make a call on typing a keyword in the tagpicker field.

We would like to make this call to call our custom servlet. We would like to know if this file can be customized and would it have any impact on the pathpicker widget.

We really appreciate your prompt responses.

Thanks!

Sujeet Palepu

Avatar

Community Advisor

Hi,

I Apologise, I don't have 6.2, I can't see that node in 6.3 and 6.4

But I'll suggest you can go ahead and try.

you can check Tags as Options in DropDown