Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

How to create cq:listeners for DAM metadata

Avatar

Former Community Member

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

3 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



Kautuk Sahni

Avatar

Former Community Member

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