cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Juffer <ajuf...@cc.oulu.fi>
Subject Re: [ cocoon3 ] map parameters
Date Mon, 07 Nov 2011 13:21:56 GMT
OK! This had an effect. Now the creatorId is NOT anymore null.

I firstly had just the "void setup(..)" method changed. No effect. Then 
I also included the "void setConfiguration(..)" method and the 
combination did it.

I am not sure what exactly is differently now. I guess the 
parameters.addAll(..) is essential. as two sets of parameters are passed 
on to generators?

Thanks!

On 11/07/2011 03:04 PM, Francesco Chicchiriccò wrote:
> On 07/11/2011 13:55, Andre Juffer wrote:
>> [...]
>>
>> @Override
>> public void setup(Map<String, Object> parameters) {
>> super.setup(parameters);
>> this.parameters = parameters;
>> }
>
> Try instead (as in StringTemplateGenerator, for instance):
>
> @Override
> public void setup(final Map<String, Object> parameters) {
> if (parameters != null && !parameters.isEmpty()) {
> this.parameters.putAll(parameters);
> }
> }
>
> /**
> * {@inheritDoc}
> *
> * @see
> org.apache.cocoon.pipeline.component.AbstractSAXProducer#setConfiguration(java.util.Map)
>
> */
> @Override
> public void setConfiguration(
> final Map<String, ? extends Object> parameters) {
>
> this.url = (URL) parameters.get("source");
> setup((Map<String, Object>) parameters);
> }
>
> Cheers.
>


-- 
Andre H. Juffer              | Phone: +358-8-553 1161
Biocenter Oulu and           | Fax: +358-8-553-1141
Department of Biochemistry   | Email: andre.juffer@oulu.fi
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/
StruBioCat                   | WWW: www.strubiocat.oulu.fi
Triacle Biocomputing         | WWW: www.triacle-bc.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message