Thursday, January 10, 2013

Gotchya! My OSGI bundle is not displaying the edit button to configure settings

The Problem

Your newly minted custom OSGI bundle is using annotations for configurable properties, but there is no edit button visible to edit your properties in the Felix Config Console.

The Solution

In your @Component or @SlingServlet or similar annotation, you need to set  metatype=true for the edit settings to appear. 

@Property(name="MY-PROPERTY", description="", value="")

@Property(name="MY-PROPERTY", description="", value="", metatype=true)

To see the setting in flight, take a look at my other blog post on how to write a custom SlingServlet here.

No comments:

Post a Comment