[seam-commits] Seam SVN: r12798 - in modules/international/trunk/api/src/main/java/org/jboss/seam/international/status: builder and 1 other directory.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue May 25 17:40:50 EDT 2010


Author: lincolnthree
Date: 2010-05-25 17:40:50 -0400 (Tue, 25 May 2010)
New Revision: 12798

Modified:
   modules/international/trunk/api/src/main/java/org/jboss/seam/international/status/Bundles.java
   modules/international/trunk/api/src/main/java/org/jboss/seam/international/status/builder/BundleMessage.java
Log:
Implemented the BundleMessage resourcebundle loader.

Modified: modules/international/trunk/api/src/main/java/org/jboss/seam/international/status/Bundles.java
===================================================================
--- modules/international/trunk/api/src/main/java/org/jboss/seam/international/status/Bundles.java	2010-05-25 20:40:09 UTC (rev 12797)
+++ modules/international/trunk/api/src/main/java/org/jboss/seam/international/status/Bundles.java	2010-05-25 21:40:50 UTC (rev 12798)
@@ -67,6 +67,11 @@
 
    public ResourceBundle get(final Object key)
    {
+      if (!containsKey(key))
+      {
+         ResourceBundle bundle = ResourceBundle.getBundle(key.toString());
+         bundles.put(key.toString(), bundle);
+      }
       return bundles.get(key);
    }
 

Modified: modules/international/trunk/api/src/main/java/org/jboss/seam/international/status/builder/BundleMessage.java
===================================================================
--- modules/international/trunk/api/src/main/java/org/jboss/seam/international/status/builder/BundleMessage.java	2010-05-25 20:40:09 UTC (rev 12797)
+++ modules/international/trunk/api/src/main/java/org/jboss/seam/international/status/builder/BundleMessage.java	2010-05-25 21:40:50 UTC (rev 12798)
@@ -61,7 +61,7 @@
  */
 public class BundleMessage implements MessageBuilder
 {
-   private TemplateMessage template;
+   private final TemplateMessage template;
    private String textDefault;
    private BundleKey textKey;
 
@@ -70,7 +70,7 @@
    public BundleMessage(final Bundles bundles, final Level level)
    {
       this.bundles = bundles;
-      this.template.level(level);
+      this.template = new TemplateMessage(level);
    }
 
    /**



More information about the seam-commits mailing list