the pub and form input examples works correctly, take a look at those. -igor
On Tue, Aug 23, 2011 at 11:13 AM, Gregor Kaczor <[email protected]> wrote: > I have exactly the same problem, though i use an xml file for the > translations. Any help out there? > > On 08/23/2011 02:09 PM, Alexandros Karypidis wrote: >> >> Hello, >> >> I have written a locale selector by extending DropDownChoice (you can see >> the essential stuff of the implementation below). The problem is that when >> the user changes the locale, the page needs to be re-rendered using the >> newly selected locale. This does NOT happen. Instead, only the "<select>" >> input box seems to be refreshed to use the new locale, whereas the rest of >> the page content is still rendered using the previously selected locale. >> However, the locale has been changed in the Session which can be seen when >> the user navigates to another page (e.g. by clicking on a link), as the new >> page is rendered using the newly-selected locale. >> >> So, how can I force the current page to be re-rendered? >> >> Implementation of my locale selector is as follows: >> >> Markup: <select wicket:id="localeSelection"></select> >> Component code: >> public class LocaleDropDown extends DropDownChoice<Locale> { >> //... >> public LocaleDropDown(final String id, final List<Locale> choices) { >> // ... >> setModel(new IModel<Locale>() { >> public Locale getObject() { >> return getSession().getLocale(); >> } >> @Override >> public void setObject(Locale locale) { >> getSession().setLocale(locale); >> // need something here to tell wicket to refresh the entire >> page? >> } >> }); >> // ... >> } >> >> @Override >> protected boolean wantOnSelectionChangedNotifications() { >> // post an event when user changes the selected value in the >> drop-down box >> return true; >> } >> } >> >> -- Kind regards, Alex >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> > > > -- > How to find files on the Internet? FindFiles.net <http://findfiles.net>! > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
