List of usage examples for org.apache.wicket.resource.loader InitializerStringResourceLoader InitializerStringResourceLoader
public InitializerStringResourceLoader(List<IInitializer> initializers)
From source file:org.apache.isis.viewer.wicket.viewer.settings.IsisResourceSettings.java
License:Apache License
/** * Configures Wicket's default ResourceLoaders. * * <p>/*from w ww .j a va 2 s.com*/ * In contrast to the default lookup strategy, Isis' searches for application-specific properties first. * * </p> * For an example in {@code FooApplication} let {@code bar.Foo} extend {@link org.apache.wicket.Component}, this * results in the following ordering: * <dl> * <dt>application specific</dt> * <dd> * <ul> * <li>FooApplication.properties</li> * <li>Application.properties</li> * </ul> * </dd> * <dt>component specific</dt> * <dd> * <ul> * <li>bar/Foo.properties</li> * <li>org/apache/wicket/Component.properties</li> * </ul> * </dd> * <dt>package specific</dt> * <dd> * <ul> * <li>bar/package.properties</li> * <li>package.properties (on Foo's class loader)</li> * <li>org/apache/wicket/package.properties</li> * <li>org/apache/package.properties</li> * <li>org/package.properties</li> * <li>package.properties (on Component's class loader)</li> * </ul> * </dd> * <dt>validator specific</dt> * <dt>Initializer specific</dt> * <dd> * <ul> * <li>bar.Foo.properties (Foo implementing IInitializer)</li> * </ul> * </dd> * </dl> * * @param application */ public IsisResourceSettings(Application application) { super(application); // consult first (the default implementation checks this only third) stringResourceLoaders.add(new ClassStringResourceLoader(application.getClass())); stringResourceLoaders.add(new ComponentStringResourceLoader()); stringResourceLoaders.add(new PackageStringResourceLoader()); // this is where the default implementation registered the search. //stringResourceLoaders.add(new ClassStringResourceLoader(application.getClass())); stringResourceLoaders.add(new ValidatorStringResourceLoader()); stringResourceLoaders.add(new InitializerStringResourceLoader(application.getInitializers())); }