1) no need to use spring 2) It's easy if you take a look at the source of org.apache.tapestry.services.impl.ComponentMessages and its base class org.apache.hivemind.impl.AbstractMessages
It's then a matter of: a) overriding public String getMessage(String key) and when the key isn't found, search in the DB... getLocale() will give you the locale you're looking for b) override ComponentMessagesSourceImpl and make Messages getMessages(IComponent component) return instances of the class you created in the previous step c) configure everything in hivemind, so that tapestry uses your message source instead of its own On Thu, May 29, 2008 at 11:59 AM, Bastian Voigt <[EMAIL PROTECTED]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Andreas Andreou wrote: > >> http://wiki.apache.org/tapestry/HowTos >> >> see the Resources / I18n section > > Andreas, > thank you for the link! > Two further questions: > > 1. Do I need Spring to do it? (we're not using Spring) > > 2. I want all my tapestry components and pages to still use the > localized strings from my .properties files, otherwise I'm a bit afraid > to lose track of which strings are used by what component/page etc. > > The only thing that should come from the DB is the localized names of > persistent objects, i.e. countries, cities, etc. > > - From the Wiki page: > [LutzHuehnken] asks: If I understand correctly, this will affect *all* > components. Is there a way to achieve this behaviour just for my own, > custom components? > > Cheers > Bastian > > > - -- > Bastian Voigt > Hamburg > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.7 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFIPnB99+lAHD7HULYRAtG9AJ9xrCU+I2uLUCcn+3kdBpH9NtTc5wCfeta2 > TEytwSnLqGjtYvF8/mdvwoE= > =oYPW > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
