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]