thanks Ard.
well.. the use-request-parameters was just an example.
actually, I am writing a reader and I dont want to hardcode a value. So,
thot of passing it from sitemap.
So, where in the sitemap shud I be putting this value and where in the
reader code shud I be reading it?
thanks
-S.
From: "Ard Schrijvers" <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: <[email protected]>
Subject: RE: difference betn configuration and parameters
Date: Thu, 12 Oct 2006 20:28:48 +0200
Hello,
>
>
> Hi,
>
> I was looking at some of the cocoon source-code that has some
> configurable
> entries in the sitemap
> (eg: ResourceReader, TraxTransformer etc.)
>
> in the configure method, it retreives the entry from sitemap in the
> following way,
>
> Configuration child;
> child = conf.getChild("use-request-parameters");
> this.useParameters = child.getValueAsBoolean(false);
> this._useParameters = this.useParameters;
Configuration typically is called during configure of the component
(happens already at cocoon start-up, also see
http://excalibur.apache.org/framework/lifecycle.html). You can see this
configuration (in cocoon.xconf) of the component as "global" default
configuration of your component. (configure is only called once per
instance of the component...I think :-) ).
Now, calling a pipeline using this component, like the TraxTransformer runs
the setup method. During setup, typically, you can override default
component behavior, like setting use-request-parameters to another value.
I don't think you will freq use this for the TraxTransformer, but for
example for readers it is very common, to define one default reader in
components in the sitemap with some expires value, and then, in specific
matchers override this default value.
Then, I want to end with my evangelistic remark (I did not count, but there
must be many) : For the TraxTransformer, never never ever set
user-request-parameters to true!!
Regards Ard
>
> and again, in the setup method,
>
> _useParameters = par.getParameterAsBoolean("use-request-parameters",
> this.useParameters);
>
> ----------
> whats the difference between the two???
> why should we do it 2 times???
>
> thanks
>
> -S.
>
> _________________________________________________________________
> Share your special moments by uploading 500 photos per month
> to Windows Live
> Spaces
> http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?h
> ref=http://www.get.live.com/spaces/features
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Express yourself - download free Windows Live Messenger themes!
http://clk.atdmt.com/MSN/go/msnnkwme0020000001msn/direct/01/?href=http://imagine-msn.com/themes/vibe/default.aspx?locale=en-us&source=hmtagline
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]