How to set default value to multi-valued OSGi property? | Community
Skip to main content
Dinu_Arya
Level 6
December 19, 2016
Solved

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

  • December 19, 2016
  • 2 replies
  • 3383 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

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...  

2 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
December 19, 2016

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...  

Dinu_Arya
Dinu_AryaAuthor
Level 6
December 21, 2016

Hi Scott,

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

Thanks,

AryA.