Localization questions

2015-02-26 Thread Maxim Solodovnik
Hello All, I have couple of questions related to localization: 1) is there any way to list all available locales in Application? let's say I have Application.properties.xml, Application_de.properties.xml, Application_ru.properties.xml, I would like to get list of Locale.EN, Locale.DE, Locale.RU

Re: Localization questions

2015-02-26 Thread Tobias Soloschenko
Hi, As far as I know it is like this: 1) Every component is providing the current locale which is configured by the preferred language of the browser via #getLocale() derived from the websession or its parent (but root is from websession) I think there is no way to get a list of all

Re: Localization questions

2015-02-26 Thread Sven Meier
2) Wicket's Localizer offers several methods with locale parameter, you can get it via component.getLocalizer(). Sven On 26.02.2015 12:22, Maxim Solodovnik wrote: Hello All, I have couple of questions related to localization: 1) is there any way to list all available locales in

Re: Localization questions

2015-02-26 Thread Tobias Soloschenko
Oh yes! :-) Forgot to mention Localizer! kind regards Tobias Am 26.02.2015 um 12:38 schrieb Sven Meier s...@meiers.net: 2) Wicket's Localizer offers several methods with locale parameter, you can get it via component.getLocalizer(). Sven On 26.02.2015 12:22, Maxim Solodovnik

Re: Localization questions

2015-02-26 Thread Maxim Solodovnik
Thanks a lot! Localizer seems to be exactly what I need :) On Thu, Feb 26, 2015 at 5:42 PM, Tobias Soloschenko tobiassolosche...@googlemail.com wrote: Oh yes! :-) Forgot to mention Localizer! kind regards Tobias Am 26.02.2015 um 12:38 schrieb Sven Meier s...@meiers.net: 2)

Using forms defined in panels

2015-02-26 Thread Andrew Hall
Hi all, I have a newbie question ... In the free online guide for Wicket - best practices section,2 listings are provided as examples of how to encapsulate components in panels: (http://wicket.apache.org/guide/guide/bestpractices.html#bestpractices_1) Listing 3:// Good component public class

Re: Using forms defined in panels

2015-02-26 Thread Sven Meier
Hi, the easiest solution is declare regModel as final, then you can do something as follows: form.add(new SubmitButton(register) { public void onSubmit() { // do something regModel.getObject().getUserName(); } }); Note that