public class ClassStringResourceLoader extends ComponentStringResourceLoader
An instance of this loader is registered with the Application by default.
| Constructor and Description |
|---|
ClassStringResourceLoader(Class<?> clazz)
Create and initialize the resource loader.
|
| Modifier and Type | Method and Description |
|---|---|
String |
loadStringResource(Class<?> clazz,
String key,
Locale locale,
String style,
String variation)
Get the string resource for the given combination of component class, resource key, locale
and style.
|
String |
loadStringResource(Component component,
String key,
Locale locale,
String style,
String variation)
Get the string resource for the given combination of component, resource key, locale and
style.
|
getPropertiesFactory, getResourcePath, isStopResourceSearch, newResourceNameIteratorpublic ClassStringResourceLoader(Class<?> clazz)
clazz - The class that this resource loader is associated withpublic String loadStringResource(Class<?> clazz, String key, Locale locale, String style, String variation)
IStringResourceLoaderloadStringResource in interface IStringResourceLoaderloadStringResource in class ComponentStringResourceLoaderclazz - The class to get the string resource forkey - The key should be a String containing a lookup key into a resource bundlelocale - The locale should contain the locale of the current operation so that the
appropriate set of resources can be selectedstyle - The style identifying the resource set to select the strings from (see
Session)variation - The components variation (of the style)ComponentStringResourceLoader.loadStringResource(java.lang.Class,
java.lang.String, java.util.Locale, java.lang.String, java.lang.String)public String loadStringResource(Component component, String key, Locale locale, String style, String variation)
IStringResourceLoaderloadStringResource in interface IStringResourceLoaderloadStringResource in class ComponentStringResourceLoadercomponent - The component to get the string resource forkey - The key should be a String containing a lookup key into a resource bundlelocale - Will be preset with the appropriate value. You shall ignore the component's
locale.style - Will be preset with the appropriate value. You shall ignore the component's style.variation - Will be preset with the appropriate value. You shall ignore the component's
variation.ComponentStringResourceLoader.loadStringResource(org.apache.wicket.Component,
String, java.util.Locale, String, String)Copyright © 2006–2014 Apache Software Foundation. All rights reserved.