Hi,
there is a compilation failure in wicket trunk:
[INFO] Compilation failure
.../wicket/src/main/java/wicket/resource/loader/BundleStringResourceLoader.java:[32,7]
wicket.resource.loader.BundleStringResourceLoader is not abstract and does not
override abstract method loadStringResource(wicket.Component,java.lang.String)
in wicket.resource.loader.IStringResourceLoader
The attached patch should fix it.
Regards,
Bendis
Index: wicket/src/main/java/wicket/resource/loader/BundleStringResourceLoader.java
===================================================================
--- wicket/src/main/java/wicket/resource/loader/BundleStringResourceLoader.java (revision 513227)
+++ wicket/src/main/java/wicket/resource/loader/BundleStringResourceLoader.java (working copy)
@@ -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);
+ }
+}