Class ResourceSettings

  • All Implemented Interfaces:

    public class ResourceSettings
    extends Object
    implements IPropertiesFactoryContext
    Class for resource related settings

    resourcePollFrequency (defaults to no polling frequency) - Frequency at which resources should be polled for changes.

    resourceFinders - Add/modify this to alter the search path for resources.

    useDefaultOnMissingResource (defaults to true) - Set to true to return a default value if available when a required string resource is not found. If set to false then the throwExceptionOnMissingResource flag is used to determine how to behave. If no default is available then this is the same as if this flag were false

    A ResourceStreamLocator - An Application's ResourceStreamLocator is used to find resources such as images or markup files. You can supply your own ResourceStreamLocator if your prefer to store your application's resources in a non-standard location (such as a different filesystem location, a particular JAR file or even a database) by overriding the getResourceLocator() method.

    Resource Factories - Resource factories can be used to create resources dynamically from specially formatted HTML tag attribute values. For more details, see IResourceFactory, DefaultButtonImageResourceFactory and especially LocalizedImageResource.

    A Localizer The getLocalizer() method returns an object encapsulating all of the functionality required to access localized resources. For many localization problems, even this will not be required, as there are convenience methods available to all components: Component.getString(String key) and Component.getString(String key, org.apache.wicket.model.IModel model).

    stringResourceLoaders - A chain of IStringResourceLoader instances that are searched in order to obtain string resources used during localization. By default the chain is set up to first search for resources against a particular component (e.g. page etc.) and then against the application.

    Jonathan Locke, Chris Turner, Eelco Hillenius, Juergen Donnerstag, Johan Compagner, Igor Vaynberg (ivaynberg), Martijn Dashorst, James Carman
    • Constructor Detail

      • ResourceSettings

        public ResourceSettings​(Application application)
        Configures Wicket's default ResourceLoaders.
        For an example in FooApplication let bar.Foo extend Component, this results in the following ordering:
        component specific
        • bar/
        • org/apache/wicket/
        package specific
        • bar/
        • (on Foo's class loader)
        • org/apache/wicket/
        • org/apache/
        • org/
        • (on Component's class loader)
        application specific
        validator specific
        Initializer specific
        • (Foo implementing IInitializer)
        application -