Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Grzegorz Kossakowski <grek <at> tuffmail.com>
Subject: [RT] Making components configurable per block in Cocoon 2.2
Newsgroups: gmane.text.xml.cocoon.devel
Date: Tuesday 18th September 2007 08:30:27 UTC (over 9 years ago)
Hi,

I would like to address an issue that we are facing today that there is no
option to use different
default ELs for each block. Our Spring-based configuration of beans is
global and in context of
default settings it's very inconvenient.

If I'm not wrong, solving this problem in clear manner is in scope of our
OSGi effort. Am I right,
Daniel?

Nevertheless, OSGi integration won't make it into Cocoon 2.2 so we have to
find another way even if
it's rather hacky. I believe I found such "hack" that I'll explain taking
ELs as example. My plan is
quite simple:
1. Component that has to be configured per block is declared in "call"
scope
2. Configuration values for component that are different for each block are
declared as
context-params like this:

    	
    		
			
		
		
	
3. Implement BeanPostProcessor that will inject property value for
ExpressionFactory whenever it is
created

What I would like to stress is the fact that I'm *not* willing to implement
this as general
mechanism but only limit myself to this one use case. If there is another
strong need for per-block
configuration we could think about implementing another BeanPostProcessor
but I really think we
should not invest too much time/discussion into this as we are going to
have better solutions in
(hopefully) near future.

WDYT?

-- 
Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon
http://reflectingonthevicissitudes.wordpress.com/
 
CD: 3ms