cocoon-dev mailing list archives

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

>
>
> Sylvain Wallez wrote:


<snip/>

>> 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
>
> http://wiki.cocoondev.org/Wiki.jsp?page=InterpretedSitemapInternals 


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

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message