Expand my Community achievements bar.

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

How to set default value to multi-valued OSGi property?

Avatar

Level 7

Hi Team,

I have added a multi-valued property and set the default value to the property like below -

@Property(name = "recipientsEmailIDs", cardinality = Integer.MAX_VALUE, unbounded = PropertyUnbounded.ARRAY, label = "Recipient Email ID(s)", value = {"contentapprover@domain.com"}, description = "Provide the recipients email ids")

But I didn't get the default value in OSGi configuration. I'm working in AEM6.2 version.

Please help me in this.

Thanks,

AryA.

1 Accepted Solution

Avatar

Correct answer by
Level 10

See this thread: http://stackoverflow.com/questions/35297722/how-to-use-multi-valuearray-property-in-sling

Also - if you are interested in multi-value OSGi config values -- we cover how to work with multi-value OSGI configuration values here:

https://helpx.adobe.com/experience-manager/using/osgi_config.html

Hope this helps...  

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

See this thread: http://stackoverflow.com/questions/35297722/how-to-use-multi-valuearray-property-in-sling

Also - if you are interested in multi-value OSGi config values -- we cover how to work with multi-value OSGI configuration values here:

https://helpx.adobe.com/experience-manager/using/osgi_config.html

Hope this helps...  

Avatar

Level 7

Hi Scott,

Whatever I posted executed correctly. Because of some build issues, it didn't work earlier. Now its working fine.

Thanks,

AryA.