tiles-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r934508 - /tiles/framework/trunk/tiles-core/src/main/java/org/apache/tiles/definition/UrlDefinitionsFactory.java
Date Thu, 15 Apr 2010 18:30:52 GMT
Author: apetrelli
Date: Thu Apr 15 18:30:51 2010
New Revision: 934508

URL: http://svn.apache.org/viewvc?rev=934508&view=rev
Log:
TILES-499
Applied patch by Mck SembWever.

Modified:
    tiles/framework/trunk/tiles-core/src/main/java/org/apache/tiles/definition/UrlDefinitionsFactory.java

Modified: tiles/framework/trunk/tiles-core/src/main/java/org/apache/tiles/definition/UrlDefinitionsFactory.java
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-core/src/main/java/org/apache/tiles/definition/UrlDefinitionsFactory.java?rev=934508&r1=934507&r2=934508&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-core/src/main/java/org/apache/tiles/definition/UrlDefinitionsFactory.java
(original)
+++ tiles/framework/trunk/tiles-core/src/main/java/org/apache/tiles/definition/UrlDefinitionsFactory.java
Thu Apr 15 18:30:51 2010
@@ -33,6 +33,7 @@ import org.apache.tiles.definition.dao.D
 import org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO;
 import org.apache.tiles.definition.dao.URLReader;
 import org.apache.tiles.impl.BasicTilesContainer;
+import org.apache.tiles.locale.impl.DefaultLocaleResolver;
 import org.apache.tiles.util.LocaleUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -164,10 +165,21 @@ public class UrlDefinitionsFactory exten
      * @return The default definition DAO.
      * @since 2.1.0
      */
-    protected DefinitionDAO<Locale> createDefaultDefinitionDAO() {
+    protected ResolvingLocaleUrlDefinitionDAO createDefaultDefinitionDAO() {
         return new ResolvingLocaleUrlDefinitionDAO();
     }
 
+    @Override
+    public void init(Map<String, String> params) {
+        super.init(params);
+        setLocaleResolver(new DefaultLocaleResolver());
+        ResolvingLocaleUrlDefinitionDAO dao = createDefaultDefinitionDAO();
+        dao.setApplicationContext(applicationContext);
+        dao.init(params);
+        setDefinitionDAO(dao);
+
+    }
+
     /**
      * Creates and returns a {@link Definitions} set by reading
      * configuration data from the applied sources.



Mime
View raw message