Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 59118 invoked from network); 18 Nov 2008 12:40:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Nov 2008 12:40:57 -0000 Received: (qmail 49279 invoked by uid 500); 18 Nov 2008 12:40:59 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 49040 invoked by uid 500); 18 Nov 2008 12:40:59 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 49029 invoked by uid 99); 18 Nov 2008 12:40:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Nov 2008 04:40:59 -0800 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ap-cocoon-users@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Nov 2008 12:39:34 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1L2PsM-0003VV-R5 for users@cocoon.apache.org; Tue, 18 Nov 2008 12:40:15 +0000 Received: from adsl-ull-233-180.49-151.net24.it ([151.49.180.233]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Nov 2008 12:40:14 +0000 Received: from lmorandini by adsl-ull-233-180.49-151.net24.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Nov 2008 12:40:14 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: users@cocoon.apache.org From: Luca Morandini Subject: Re: Block param Date: Tue, 18 Nov 2008 13:40:05 +0100 Lines: 43 Message-ID: References: <492285DC.9020407@integromics.com> Reply-To: lmorandini@ieee.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: adsl-ull-233-180.49-151.net24.it User-Agent: Thunderbird 2.0.0.16 (X11/20080723) In-Reply-To: <492285DC.9020407@integromics.com> Sender: news X-Virus-Checked: Checked by ClamAV on apache.org 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"); factory.setOutputStreamType(mimetype); try { factory.setup(); } catch (Exception e) { getLogger().error("Configuration error", e); } getLogger().debug("Configure"); } 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 components. Regards, -------------------- Luca Morandini www.lucamorandini.it -------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org