cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Refondini <>
Subject Re: How to run block built with cocoon-22-archetype-block
Date Fri, 08 Dec 2006 16:03:59 GMT
Daniel Fagerstrom wrote:
> Patrick Refondini skrev:
> ...
>> It seems that block protocol is not available from root webapp 
>> according to:

>> Or do I miss something ?
> That is correct. The block servlets are Spring components that are wired 
> together in a Spring configuration. The block connections are put into a 
> property map where a key and a component reference are a associated. The 
> key is used as block name in the block protocol within the block.
> As the root webapp not is a Spring component, it is not obvious how to 
> use the mechanism for the block protocol within it. I started to 
> implement another protocol that would make it possible to call blocks 
> from the root sitemap using the block servlets component identifier, but 
> I have not found the time to finish it.
> It is also possible to access static resources from a block using the 
> blockcontext protocol. It is however not the recommended way as a block 
> is intended to be an isolated unit that only should be accessed through 
> its "public" API in form of the block protocol. The blockcontext 
> protocol is more intended for internal use in Cocoon and for setting up 
> the blockcontext property i the block servlet configuration.
Ok, I already read "bad practise" for the above (certainly from you) in 
some thread, but now it is much clearer why.

> One can also use a block for the "root" sitemap in this scenario 
> everything is a block. For the moment I would say that this is the 
> recommended way for those testing the blocks fw.
I will try this together with starting testing inter-block protocol 
communications. I will certainly start a Block Protocol thread at that 
time :)

Thanks for your valuable input,


> ======
> I don't know enough about the block archetype to answer the rest of your 
> questions.
> /Daniel

View raw message