I think it is a RFE. Juergen
On 4/24/06, Marco Geier <[EMAIL PROTECTED]> wrote: > johan, > > the fallback mechanism works fine *on the bundle-level*, i.e. Wicket > will try all these SomeApplication_locale_style.properties combinations > down to SomeApplication.properties. > > But once it found a bundle it will not longer look for another bundle, > even if the key is not contained, but could be found in a more generic > bundle. > > What i (and presumably Ari) wanted tried to achieve, is to have some > style-specific bundle wich only contains some keys with style-specific > values and thus not having to maintain a bunch of property files if we > add another key, eventhough it's value would be the same across all styles. > > But since this behaviour is *not* how java usually deals with > .properties, i'm not sure if this is a bug. > > Anyway this would be a nice feature, but maybe should be explicitly > activated somehow.... > > So should i put this into sf as a bug or as a feature request? > > Marco > > Johan Compagner wrote: > > we should try to fall back to those better then (i thought this already > > happend) > > can you make a bug report for this with a small (unit) test case ? > > > > johan > > > > > > On 4/24/06, Marco Geier <[EMAIL PROTECTED]> wrote: > > > >>by default you need all values in all files! > >> > >>I had the same problem and adding the following code to application's > >>init did the trick: > >> > >>getResourceSettings().addStringResourceLoader(new > >>ApplicationStringResourceLoader(this) { > >> > >> @Override > >> public String loadStringResource(Class clazz, String key, Locale > >>locale, String style) { > >> return super.loadStringResource(clazz, key, locale, null); > >> } > >> > >>}); > >> > >>getResourceSettings().addStringResourceLoader(new > >>ApplicationStringResourceLoader(this) { > >> > >> @Override > >> public String loadStringResource(Class clazz, String key, Locale > >>locale, String style) { > >> return super.loadStringResource(clazz, key, null, locale); > >> } > >> > >>}); > >> > >>getResourceSettings().addStringResourceLoader(new > >>ApplicationStringResourceLoader(this) { > >> > >> @Override > >> public String loadStringResource(Class clazz, String key, Locale > >>locale, String style) { > >> return super.loadStringResource(clazz, key, null, null); > >> } > >> > >>}); > >> > >> > >>Please wicket-dev's tell us if there is a cleaner way... > >> > >>Marco > >> > >> > >>Ari Suutari wrote: > >> > >>>Hi, > >>> > >>>If I have following property files for my application: > >>> > >>>1) Application_myskin_fi.properties > >>>message1=AAAAAAAAA > >>>2) Application_myskin.properties > >>>message2=BBBBBBBB > >>>3) Application.properties > >>>message3=CCCCCCC > >>> > >>>If I have three messages above, must > >>>I put values for these keys for each property file, or will wicket > >>>search files 2 and 3 even file 1 exists, ie. if i call > >>>Component.getString("message1") > >>>it is retrieved from file 1 but if I call Component.getString > >> > >>("message3") > >> > >>>is is correctly read from file 3. > >>> > >>>I cannot get this to work and I'm not sure where the problem is. > >>> > >>> Ari S. > >>> > >>> > >>> > >>>------------------------------------------------------- > >>>Using Tomcat but need to do more? Need to support web services, > >> > >>security? > >> > >>>Get stuff done quickly with pre-integrated technology to make your job > >>>easier > >>>Download IBM WebSphere Application Server v.1.0.1 based on Apache > >> > >>Geronimo > >> > >>>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > >>>_______________________________________________ > >>>Wicket-user mailing list > >>>Wicket-user@lists.sourceforge.net > >>>https://lists.sourceforge.net/lists/listinfo/wicket-user > >>> > >>> > >> > >>-- > >>___________________________ > >> > >>Dipl.-Ing. Marco Geier > >>EyeTea GmbH > >>Germany > >>phone +49 (0)721 662464-0 > >>fax +49 (0)721 662464-1 > >>mobile +49 (0)177 6579590 > >>[EMAIL PROTECTED] > >> > >> > >>------------------------------------------------------- > >>Using Tomcat but need to do more? Need to support web services, security? > >>Get stuff done quickly with pre-integrated technology to make your job > >>easier > >>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > >>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > >>_______________________________________________ > >>Wicket-user mailing list > >>Wicket-user@lists.sourceforge.net > >>https://lists.sourceforge.net/lists/listinfo/wicket-user > >> > > > > > > -- > ___________________________ > > Dipl.-Ing. Marco Geier > EyeTea GmbH > Germany > phone +49 (0)721 662464-0 > fax +49 (0)721 662464-1 > mobile +49 (0)177 6579590 > [EMAIL PROTECTED] > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user