Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

metatype=true in AEM | AEM Community Blog Seeding

Avatar

Administrator

BlogImage.jpg

metatype=true in AEM by rashidjorvee

Abstract

Why we add parameter metatype=true in @Component annotation?

When we add parameter metatype=true then Apache felix generate a metatype.xml file for that component, if we don’t then there will no metaype.xml file.
Metatype.xml file contains an element  which have parameters name and description of the component. Under the  we have another ta  which have detail information of property which we want to make visible and configurable on Apache felix console localhost:4502/system/console/configMgr.
So if we specified ten properties in our component then there will be ten  elements under the 

Metatype.xml file also contains the element  with attribute PID and  which has parameter OCDREF under the  element, which represent and store the configured values. Value for PID and OCDREF is always used to same and that is also the name of the file which you will find in the CRX.

When we add metatype=true in the parameter of @component that means we have made the property of that component or service configurable and visible on Felix console, which is an easy and helpful way to configure properties of any component and service. Felix web console uses the meta type information to show user-friendly and easy the GUI configuration.

Read Full Blog

metatype=true in AEM

Q&A

Please use this thread to ask the related questions.



Kautuk Sahni
0 Replies