Kotireddy Naru
Kotireddy Naru

Reputation: 17

how to replace osgi configuration properties through aem dialog

I searched below blogs,but I didn't find exact solution,initially i configured OSGI configuration properties through java class, and i want replace these values from dialog input.

Upvotes: 2

Views: 1315

Answers (2)

Aleksey Slyshkov
Aleksey Slyshkov

Reputation: 136

OSGI property can be configured by an OSGI service configuration dialog. E.g.

All configuration you can find on a special OSGI Configuration tab

Upvotes: 2

Imran Saeed
Imran Saeed

Reputation: 3444

Your service must have the org.apache.felix.scr.annotations.Service and optionally org.apache.felix.scr.annotations.Component annotations.

Use the org.apache.felix.scr.annotations.Properties and org.apache.felix.scr.annotations.Property as in the example below:

@Properties({
        @Property(
                label = "Some Property",
                description = "Some custom property",
                name = "myComponent.property",
                value = "default value"
        )
})

After your service is deployed, you can go to /system/console/configMgr of your AEM instance and modify the properties using the dynamically generated properties dialog. This is the default bahaviour of the system.

Hope this helps.

Upvotes: 1

Related Questions