cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luca Morandini <>
Subject Re: Block param
Date Tue, 18 Nov 2008 12:40:05 GMT
Jose Luis Carmona wrote:
> Hi all,
> I have a block with my own Generator, and I want to define a param (a 
> path to write) accessible inside all the classes of this block. Where 
> should I declare this param?. How should I access to the param's value 
> inside of the Generator?

Parameters to Cocoon components are passed using "setup" and "configure" 
methods, like in:

    public void configure(Configuration conf) throws
	ConfigurationException {

	this.mimetype = conf.getAttribute("mime-type");

	try {
	} catch (Exception e) {
	    getLogger().error("Configuration error", e);


These parameters are defined in the sitemap, either in the pipelines 
("setup" method, using "map:parameter" elements) or components' 
configuration section ("configure" method).

Using the input modules you can get parameters' values from request 
parameters, session attributes, external XML files, configuration 
properties file, etc.

Hence, you have a fair degree of flexibility in passing parameters to 


    Luca Morandini

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

View raw message