struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r427535 - /struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/DefinitionsFactoryConfig.java
Date Tue, 01 Aug 2006 11:26:32 GMT
Author: apetrelli
Date: Tue Aug  1 04:26:32 2006
New Revision: 427535

URL: http://svn.apache.org/viewvc?rev=427535&view=rev
Log:
SB-24
Applied patch: added populateExtraAttributes method that loads the missing parameters

Modified:
    struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/DefinitionsFactoryConfig.java

Modified: struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/DefinitionsFactoryConfig.java
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/DefinitionsFactoryConfig.java?rev=427535&r1=427534&r2=427535&view=diff
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/DefinitionsFactoryConfig.java
(original)
+++ struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/DefinitionsFactoryConfig.java
Tue Aug  1 04:26:32 2006
@@ -259,6 +259,7 @@
 
         // link old parameter names for backward compatibility
         linkOldPropertyNames(properties);
+        populateExtraAttributes(properties);
         BeanUtils.populate(this, properties);
     }
 
@@ -309,5 +310,18 @@
      */
     public void setFactoryName(String factoryName) {
         this.factoryName = factoryName;
+    }
+    
+    /**
+     * Adds all implementation-specific extra attributes from the configuration.
+     * 
+     * @param properties Map keyed by property name, with the
+     *  corresponding (String or String[]) value(s) to be set.
+     */
+    protected void populateExtraAttributes(Map properties) {
+        setAttribute(DefinitionsFactory.READER_IMPL_PROPERTY,
+                properties.get(DefinitionsFactory.READER_IMPL_PROPERTY));
+        setAttribute(DefinitionsFactory.DEFINITIONS_IMPL_PROPERTY,
+                properties.get(DefinitionsFactory.DEFINITIONS_IMPL_PROPERTY));
     }
 }



Mime
View raw message