cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <dani...@nada.kth.se>
Subject Re: How to run block built with cocoon-22-archetype-block
Date Thu, 07 Dec 2006 15:29:53 GMT
Patrick Refondini skrev:
...
> It seems that block protocol is not available from root webapp 
> according to:
> http://www.nabble.com/Configuring-BlockServlets-via-properties-and-sitemap-reloading-for-blocks-t2450880.html

>
> 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.

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 don't know enough about the block archetype to answer the rest of your 
questions.

/Daniel


Mime
View raw message