public class InitializerStringResourceLoader extends ComponentStringResourceLoader
The initializer based string resource loader attempts to find the resource from a bundle that corresponds to the supplied wicket initializers.
This implementation is fully aware of both locale and style values when trying to obtain the appropriate resources.
| Constructor and Description |
|---|
InitializerStringResourceLoader(List<IInitializer> initializers)
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, isStopResourceSearch, newResourceNameIteratorpublic InitializerStringResourceLoader(List<IInitializer> initializers)
initializers - initializerspublic 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)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.IStringResourceLoader.loadStringResource(org.apache.wicket.Component,
java.lang.String, java.util.Locale, java.lang.String, java.lang.String)Copyright © 2006–2021 Apache Software Foundation. All rights reserved.