Hi,

Am Freitag, den 30.05.2008, 13:52 +0200 schrieb Bertrand Delacretaz:
> Hi,
> 
> I asume that's an issue for the Felix project now that the console
> moved there, but as my example uses Sling, here it is...

It's ok ;-)

> I've been having trouble creating a factory component, I was getting
> confused while testing, and I think I found why. My example uses the
> RequestDataLogger service, which is a factory with no initial
> instance, similar to the component that I was creating in my project.
> 
> When starting the Sling launchpad webapp after doing "mvn clean", the
> dropdown on the http://localhost:8888/system/console/configMgr page
> contains two instances of the "Customizable Request Data Logger"
> service.
> 
> $ curl -s http://localhost:8888/system/console/configMgr | grep
> RequestLoggerService
> 
> <option 
> value='factoryPid=org.apache.sling.engine.impl.log.RequestLoggerService'>...
> 
> <option value='pid=org.apache.sling.engine.impl.log.RequestLoggerService'>...

The problem with the configuration screen is that it mixes factory
configurations (like the first here) and configuration for the factory
component (like the second) which is quite confusing and must be fixed.

> 
> The first one is correct (IIUC), with a factoryPid that makes the
> "create config" button appear when selecting this option.
> 
> The second one looks to me like a useless empty config - after
> creating an actual instance of this component with the "create config"
> button, I get:
> 
> <option 
> value='factoryPid=org.apache.sling.engine.impl.log.RequestLoggerService'>...
> 
> <option value='pid=org.apache.sling.engine.impl.log.RequestLoggerService'>...
> 
> <option 
> value='pid=org.apache.sling.engine.impl.log.RequestLoggerService.85d3d22e-8992-4a56-be96-63efd501a468'>...

That is correct, the first two are the same as above and the third is
the configured one.

> 
> Again, the second option seems superfluous - and in firefox, one
> cannot then select the first option anymore to create new configs,
> unless the page is reloaded first.
> 
> Am I doing something wrong?

Now, everything is alright -- at least on your part --, though very
confusing, I admit.

Regards
Felix


Reply via email to