Re: How to store/load strings shared by many (but not all) pages?
Wicket uses a chain of resolvers, by default these are: (see Settings class) ComponentStringResourceLoader, PackageStringResourceLoader, ClassStringResourceLoader and ValidatorStringResourceLoader. So besides the component specific resource you may define respources per package (e.g. 'package_de.properties') and for the whole application, the latter named like your application class (e.g. MyApp.properties) On Oct 4, 2009, at 05:32, David Chang wrote: I am reading Wicket in Action and have this i18n/i10n-related question : Suppose that I have a string that is used on multiple (but NOT ALL) pages. One solution is that I can put this string in the property files for each page on which the string is used. Any other better solutions? Thanks for your input! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to store/load strings shared by many (but not all) pages?
I was thinking about this yesterday... This is a very common scenario, specially for i18n messages related to exceptions. Thanks for the info =) On Mon, Oct 5, 2009 at 9:52 AM, Robin Sander robin.san...@gmx.net wrote: Wicket uses a chain of resolvers, by default these are: (see Settings class) ComponentStringResourceLoader, PackageStringResourceLoader, ClassStringResourceLoader and ValidatorStringResourceLoader. So besides the component specific resource you may define respources per package (e.g. 'package_de.properties') and for the whole application, the latter named like your application class (e.g. MyApp.properties) On Oct 4, 2009, at 05:32, David Chang wrote: I am reading Wicket in Action and have this i18n/i10n-related question : Suppose that I have a string that is used on multiple (but NOT ALL) pages. One solution is that I can put this string in the property files for each page on which the string is used. Any other better solutions? Thanks for your input! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */
Re: How to store/load strings shared by many (but not all) pages?
Igor, thanks so much for the tip! Cheers! --- On Sun, 10/4/09, Igor Vaynberg igor.vaynb...@gmail.com wrote: From: Igor Vaynberg igor.vaynb...@gmail.com Subject: Re: How to store/load strings shared by many (but not all) pages? To: users@wicket.apache.org Date: Sunday, October 4, 2009, 12:52 AM YourApplicationClass.properties sitting next to you YourApplicationClass.java/class will do the trick. all components/pages have access to properties stored there. -igor On Sat, Oct 3, 2009 at 8:32 PM, David Chang david_q_zh...@yahoo.com wrote: I am reading Wicket in Action and have this i18n/i10n-related question : Suppose that I have a string that is used on multiple (but NOT ALL) pages. One solution is that I can put this string in the property files for each page on which the string is used. Any other better solutions? Thanks for your input! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org %2 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to store/load strings shared by many (but not all) pages?
I am reading Wicket in Action and have this i18n/i10n-related question : Suppose that I have a string that is used on multiple (but NOT ALL) pages. One solution is that I can put this string in the property files for each page on which the string is used. Any other better solutions? Thanks for your input! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to store/load strings shared by many (but not all) pages?
YourApplicationClass.properties sitting next to you YourApplicationClass.java/class will do the trick. all components/pages have access to properties stored there. -igor On Sat, Oct 3, 2009 at 8:32 PM, David Chang david_q_zh...@yahoo.com wrote: I am reading Wicket in Action and have this i18n/i10n-related question : Suppose that I have a string that is used on multiple (but NOT ALL) pages. One solution is that I can put this string in the property files for each page on which the string is used. Any other better solutions? Thanks for your input! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org