For non metatype described configurations, I would just use a single text area and display / load the configuration using the java.util.Properties text serialization methods. I've added some metatype descriptions to Karaf configurations, but I think some of them can not be easily described by metatype, such as the one for pax-logging-service (which is actually a log4j properties file), so I think it makes sense to allow them to be edited / displayed somehow.
2009/5/11 Felix Meschberger <fmesc...@gmail.com>: > Hi Guillaume, > > Guillaume Nodet schrieb: >> What is the config tab supposed to display when the configurations >> available in the config admin do not have any metadata infos and are >> not SCR managed ? >> Currently, those are not even displayed in the list box. >> I've been able to change that using a simple patch and now I can see 3 >> buttons (save, reset, delete), but no way to change any values. >> Any idea? > > Yes ;-) > > The reason for only displaying configurations for which metadata exists, > is to limit the configuration list. In addition the web console uses the > metadata to render the configuration GUI. > > If there is no metadata, all the web console could do is show the > configuration values as name value pairs - currently IIRC in a <textarea>. > > I could imagine the following: > > * A switch allows to show or hide the service PIDs for which no metadata > exists. Service PIDs come from existing configuration and registered > ManagedService[Factory] instances. > > * Configuration for which no metadata exists can be displayed as follows: > - existing properties are displayed with property name and > input fields according to current property value (array, vector, > single value of a given type) > - additional properties may be added by specifying cardinality > and type and then the form entries are created on-the-fly > > WDYT ? > > Regards > Felix > >> >> Index: >> src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java >> =================================================================== >> --- >> src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java >> (revision >> 773613) >> +++ >> src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java >> (working >> copy) >> @@ -373,7 +373,7 @@ >> name = pid; >> } >> >> - if ( ocd != null ) >> +// if ( ocd != null ) >> { >> optionsPlain.put( pid, name ); >> } >> >> > -- Cheers, Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/ ------------------------ Open Source SOA http://fusesource.com