Hmm, I though this was done already... Or might only be upon initiation of session?

What would be the motivation for the user changing locale mid session? Otherwise i'd suggest having a button changing sessions locale.. This has worked for me in the past... Although you might want to use stringressource models.. I remember some issue but that was in beta4...

iwanj wrote:
this is my second day using wicket from struts/springmvc and I need wicket to
set up so that every request (maybe this is an old thinking?) must follow
the browser's locale.  for pages, I could easily enough to have a base page
and in its contructor do the following:

     Locale locale = getRequest().getLocale();
     locale = doSomething( locale );  // e.g. substituting non-supported
locale
     getSession().setLocale( locale );

and this works fine.  however, for button's onSubmit() wicket uses the
existing page instead of creating a new one and so my code in the base page
constructor's is not run. copying my code into every handler is one option. subclassing all such components is another. neither seems particularly
appealing for me.

I've looked at replacing standard classes (session, etc.) or overriding some
WebApplication methods, even subsclassing the WicketFilter itself, but I
still couldn't find a place where I have both the session & request objects
to do the locale setting.  being newbie, I probably missed reading some docs
somewhere or some posts in this forum (searched "locale", "request", etc.)

thanks for any help enlightening me on this hurdle.

iwanj

--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to