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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

How to create cq:listeners for DAM metadata

Avatar

Level 2

Hi,

We have a requirement where we need to add additional metadata for DAM assets. We have created an overlay as mentioned in the below url

https://docs.adobe.com/docs/en/aem/6-1/administer/content/assets/metadata/meta-edit.html#Creating New Metadata Property for Assets

Now I need to create cq:listener to show or hide certain metadata field based on dropdown selection. Kindly let me know is it possible to create cq:listener for DAM metadata. If so, how to do it. Explaining with an example would be helpful.

Note: I'm using AEM 6.1

Thanks and Regards,

Ruben Fernando

0 Replies

Avatar

Administrator

Hi 

As mentioned by Lokesh, 

Link:- http://experience-aem.blogspot.in/2014/12/aem-6-attaching-listeners-to-asset-metadata-editor-form-fi...

Demo | Package Install

 

is good reference to start with.

 

Thanks and Regards

Kautuk Sahni

Avatar

Level 2

Hi,

Thanks for the reply. I need to show or hide certain metadata field based on the dropdown selection. For normal dialog, we use findParentByType method to get either dialog or panel and then we get the required field using dialog.getField("..") method.

For DAM metadata, we don't have either dialog or tabpanel. In this case, how can I get the parent and find the required metadata field to show or hide it.

Thanks and Regards,

Ruben Fernando