Hi, if MyWicketApplication is the name of your application class then all you need to do is to create MyWicketApplication.properties next to it and it will be used with priority overthe defaults.
If this is not the case then use .add(0, new Bundle....) and it will be consulted first. On Mon, Jan 28, 2019, 00:10 Zbynek Vavros <zbynekvav...@gmail.com wrote: > Hi, > > I'm trying to provide custom properties file for Wicket application. > > I was going to use BundleStringResourceLoader using > > getResourceSettings().getStringResourceLoaders().add(new > BundleStringResourceLoader("MyWicketApplication")). > > Then I replaced "Required" message with my message it is not used. > After debugging into org.apache.wicket.Localizer I can see it iterates > through org.apache.wicket.resource.loader.IStringResourceLoader in this > order: > > ComponentStringResourceLoader > PackageStringResourceLoader > ClassStringResourceLoader > ValidatorStringResourceLoader > InitializerStringResourceLoader > BundleStringResourceLoader > > So the "Required" message is loaded from InitializerStringResourceLoader > before my BundleStringResourceLoader is hit. > > How to properly provide Wicket with custom bundle containing ALL types of > messages? > > Thanks, > Zbynek >