Sorry about that, that was a slip. We recently had a change that would allow you to pin the session's locale in the constructor. Setting the locale afterwards should have been removed. It's fixed in trunk now.
Eelco On 2/21/07, Harald Gruber <[EMAIL PROTECTED]> wrote: > hi all, > > any ideas how to set a default locale for sessions (wicket 2.0 > snapshot)? i support only a limited amount of locales in my app and need > to get some localized data from my database using the sessions locale. > > my first thought was to set the locale in my websession's constructor. > but it gets overwritten in WebApplication.getSession again > > > if (session == null) > { > // Create session using session factory > session = setSessionFactory().newSession(request); > // Set the client Locale for this session > session.setLocale(request.getLocale()); > } > > as in the Session class constructor the locale is set anyways, is there > a special reason to set the locale again right after the creation? > > protected Session(final Application application, Request request) > { > this.locale = request.getLocale(); > if (locale == null) > { > throw new IllegalArgumentException("Parameter 'locale' must > not be null"); > } > } > > thanks for your help! > h. > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user