Author: jdonnerstag
Date: Thu Mar  1 06:01:06 2007
New Revision: 513328

URL: http://svn.apache.org/viewvc?view=rev&rev=513328
Log:
missed it

Modified:
    
incubator/wicket/trunk/wicket/src/main/java/wicket/resource/loader/BundleStringResourceLoader.java

Modified: 
incubator/wicket/trunk/wicket/src/main/java/wicket/resource/loader/BundleStringResourceLoader.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/resource/loader/BundleStringResourceLoader.java?view=diff&rev=513328&r1=513327&r2=513328
==============================================================================
--- 
incubator/wicket/trunk/wicket/src/main/java/wicket/resource/loader/BundleStringResourceLoader.java
 (original)
+++ 
incubator/wicket/trunk/wicket/src/main/java/wicket/resource/loader/BundleStringResourceLoader.java
 Thu Mar  1 06:01:06 2007
@@ -20,6 +20,8 @@
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
 
+import wicket.Component;
+
 /**
  * Implementation of a string resource loader that sits on top of the ordinary
  * Java resource bundle mechanism. When created this loader must be given the
@@ -78,4 +80,20 @@
                        return null;
                }
        }
-}
\ No newline at end of file
+       
+       /**
+        * Get the requested string resource from the underlying resource 
bundle.
+        * The bundle is selected by locale and the string obtained from the 
best
+        * matching bundle.
+        * 
+        * @param component
+        *            Used to get the locale
+        * @param key
+        *            The key to obtain the string for
+        * @return The string resource value or null if resource not found
+        */
+       public final String loadStringResource(final Component component, final 
String key)
+       {
+               return loadStringResource(null, key, component.getLocale(), 
null);
+       }
+}


Reply via email to