cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: [RT] Official access to the current sitemap manager
Date Mon, 23 Feb 2004 10:31:41 GMT
Carsten Ziegeler wrote:

>I'm wondering if we want to make the access to the current
>sitemap (component/service) manager official?
>Currently (2.1), we have a static method at the CocoonComponentManager
>that allows to get the current sitemap component manager.
>This is useful in some scenarios when you want to access a
>sitemap component. If your own component is declared not in the
>current sitemap but in any parent than usually it can't access
>the components declared in the current sitemap. 
>E.g. the SourceWritingTransformer needs access to the serializers
>for writing the content. (Let's not discuss if the SWTransformer
>is the best solution for the task it does - it's just one
>I think there are other parts already using the unofficial way.
>So, the question is: do we want it to make an offical api?
>And if yes, how? I personally don't like the static method.
>And I would prefer a more indirect way, like making it available
>through the Avalon Context passed to a contextualizable component.

I agree with this need, and the context approach is definitely better 
than the static method.

Another approach can be to shield this behind the ServiceManager that is 
given to all Serviceable components so that components are always looked 
up relative to the current sitemap. This would solve all problems at 
once, but maybe it would have some nasty side effects.



Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -

View raw message