rename it? something like:

getFixedSessionLocale()?

and then this code in getSession()

if(getFixedSessionLocale() == null)
{
  // take request locale
}
else
{
  set he fixed session locale.
}

Default doesn't seem to do anything yes. Because it is always overriden again with the request locale.

Also the methods are defined in 2 interfaces IResource and IApplicationSettings


On 5/11/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
Hmmm... that looks like a mess. The default locale of resource
settings does not seem to be used at all. Furthermore it does look
like that method is supposed to 'fix' the session (and btw it helps
for executing test cases), as resources naturally fall back on files
without the localized extensions. If it is there for fixing the
locale, it doesn't do a very good job; while the default locale is
used to set the session's locale in the session's constructor, for
webapps it's overwritten again in WebApplication.getSession.

Should I fix this so that the session fixates the locale? Anyone know
what the rationale was behind this? Another way to achieving the same
is to implement a custom session and fix the session in there
(override getLocale). That's what I always do. So we actuallly can do
without the whole method.

Eelco

On 5/11/06, Bruno Borges <[EMAIL PROTECTED]> wrote:
> Shouldn't these calls override any locale the user is sending at the request
> (from the browser)?
>
>         getApplicationSettings().setDefaultLocale(new
> Locale("pt", "BR"));
>         getResourceSettings().setDefaultLocale(new
> Locale("pt", "BR"));
>
> I still get english messages, that comes from Application.properties. My
> tought was that, overriding the default locale, I would get portuguese
> messages.
>
> Regards
>
> --
> Bruno Borges
>  [EMAIL PROTECTED]
> Sun Certified Java Programmer for 1.4
> Sun Certified Web Component Developer for 1.4


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to