wicket.resource
Class ApplicationStringResourceLoader

java.lang.Object
  extended bywicket.resource.ApplicationStringResourceLoader
All Implemented Interfaces:
IStringResourceLoader

public class ApplicationStringResourceLoader
extends java.lang.Object
implements IStringResourceLoader

This string resource loader attempts to find a single resource bundle that has the same name and location as the application. If this bundle is found then strings are obtained from here. This implemnentation is fully aware of both locale and style values when trying to obtain the appropriate bundle.

Author:
Chris Turner

Constructor Summary
ApplicationStringResourceLoader(Application application)
          Create and initialise the resource loader.
 
Method Summary
 java.lang.String loadStringResource(Component component, java.lang.String key, java.util.Locale locale, java.lang.String style)
          Get the string resource for the given combination of key, locale and style.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationStringResourceLoader

public ApplicationStringResourceLoader(Application application)
Create and initialise the resource loader.

Parameters:
application - The application that this resource loader is associated with
Method Detail

loadStringResource

public final java.lang.String loadStringResource(Component component,
                                                 java.lang.String key,
                                                 java.util.Locale locale,
                                                 java.lang.String style)
Get the string resource for the given combination of key, locale and style. The information is obtained from a single application-wide resource bundle.

Specified by:
loadStringResource in interface IStringResourceLoader
Parameters:
component - Not used - can be null
key - The key to obtain the string for
locale - The locale identifying the resource set to select the strings from
style - The (optional) style identifying the resource set to select the strings from (see Session)
Returns:
The string resource value or null if resource not loaded


Copyright © 2004-2005 Wicket developers. All Rights Reserved.