it is hidden automatically by the implementation of the felix web console. it 
will not be hidden in other tools that access these properties.

i've not yet looked deeper why it does not work when defining as separate 
property - perhaps a look into the generated SCR metadata does help here, i 
assume it's missing there.

stefan


>-----Original Message-----
>From: Roy Teeuwen [mailto:[email protected]]
>Sent: Monday, January 30, 2017 12:30 PM
>To: [email protected]
>Subject: Re: Using webconsole name hints with OSGi DS annotations
>
>Hey Stefan,
>
>Thanks, this seems to work! Can you explain why this one will be hidden
>automatically? Or maybe why it doesn't work when putting it in the
>property = { } block?
>
>Greets,
>Roy
>
>
>> On 30 Jan 2017, at 12:26, Stefan Seifert <[email protected]>
>wrote:
>>
>> it should work if you include a property like this in you config
>annotation:
>>
>>  String webconsole_configurationFactory_nameHint() default "Root path:
>{" + ResourceProvider.PROPERTY_ROOT + "}";
>>
>> this property then should be hidden by the web console automatically
>so it is not editable by the user.
>>
>> stefan
>>
>>> -----Original Message-----
>>> From: Roy Teeuwen [mailto:[email protected]]
>>> Sent: Monday, January 30, 2017 12:11 PM
>>> To: [email protected]
>>> Subject: Using webconsole name hints with OSGi DS annotations
>>>
>>> Hey all,
>>>
>>> I am trying to use the webconsole namehints with the osgi
>annotations, I
>>> have the following class:
>>>
>>> @Component(
>>>       service = SomeConfiguration.class,
>>>       property = {
>>>               "webconsole.configurationFactory.nameHint=Configuration
>>> id: {configuration.id}"
>>>       }
>>> )
>>> @Designate(ocd = SomeConfiguration.Config.class, factory = true)
>>> public class SomeConfiguration {
>>>
>>>
>>>   @ObjectClassDefinition(name = "Some configuration")
>>>   @interface Config {
>>>
>>>       String configuration_id();
>>>   }
>>> }
>>>
>>> But it doesn't seem to work. If I debug in the ConfigAdminSupport and
>>> look at the
>>>
>org.apache.felix.webconsole.internal.configuration.ConfigAdminSupport#ge
>>> tConfigurationFactoryNameHint, it doesn't seem to get the webconsole
>>> namehint from the configuration properties. Am I using it wrong? It
>>> works of course when I put the
>webconsole.configurationFactory.nameHint
>>> inside the config class but I don't want it to be something
>>> configureable for the user itself. It should be a private property.
>>>
>>> I am using the webconsole version 4.2.7 by the way
>>>
>>> Greets,
>>> Roy
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to