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:r...@teeuwen.be]
>Sent: Monday, January 30, 2017 12:11 PM
>To: users@felix.apache.org
>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: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org

Reply via email to