cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francesco Chicchiriccò <ilgro...@apache.org>
Subject Re: [ cocoon3 ] map parameters
Date Mon, 07 Nov 2011 13:04:42 GMT
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.

-- 
Francesco Chicchiriccò

Apache Cocoon Committer and PMC Member
http://people.apache.org/~ilgrosso/


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


Mime
View raw message