cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: Unblocking Blocks - microstep 1
Date Sat, 01 Feb 2003 23:26:57 GMT
Nicola Ken Barozzi wrote:

> Sylvain Wallez wrote:


>> But if you look at SitemapLanguage, which is a subclass of 
>> DefaultTreeBuilder, you will notice that its createComponentManager() 
>> method creates a new CocoonComponentManager and configures it with 
>> <map:components>. So <map:components> defines components of the 
>> sitemap just a cocoon.xconf defines them for the Cocoon object.
> Yeah, this is it! So I need to change the CocoonComponentManager to be 
> able to handle the creation of stuff from the loaded blocks.
>> Adding a custom classloader to the sitemap to handle blocks should 
>> thus be just a matter of giving that custom classloader to the 
>> created CM.
> Ok. Since we will have a map:blocks section, what do you propose to do 
> in code? IE where to load the blocks? Probably simply pass also that 
> info to the CocoonComponentManager?

CocoonComponentManager (CCM) -- actually ECM, its parent class -- 
already has a constructor with the ClassLoader that's to be used to load 
components. We just have to write a BlockClassLoader that extends 
ParanoidClassLoader and give it to CCM.

Cut, paste, glue, and we're done ;-)

>> Does this answer your question ?
> Thanks :-D

Thanks ! I should have done it myself and just replied with this link ;-)


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }

To unsubscribe, e-mail:
For additional commands, email:

View raw message