[ 
http://issues.apache.org/jira/browse/WICKET-151?page=comments#action_12456723 ] 
            
Johan Compagner commented on WICKET-151:
----------------------------------------

it is simple to implement in 1.3 and 2.0 yes. (not in 1.2.2 because you didn't 
have the request in newSession())
But i can see the value for this. if somebody really wants to override some 
locale but it can be set later.
That is currently not really possible or nicely doable.

Because the initialization is also just a call after the creation.

The problem is if we change it how are we going to change it? just add another 
constructor in WebSession that has an locale
and call that one in newSession(request) ? We can't just delete the default 
one. Then we break many things (at least for 1.3 i wouldn't do that)



> set session locale when constructing session object
> ---------------------------------------------------
>
>                 Key: WICKET-151
>                 URL: http://issues.apache.org/jira/browse/WICKET-151
>             Project: Wicket
>          Issue Type: Improvement
>    Affects Versions: 2.0, 1.3
>            Reporter: Eelco Hillenius
>         Assigned To: Eelco Hillenius
>             Fix For: 2.0, 1.3
>
>
> Currently, we create the session objects like this:
> WebApplication#getSession:
> if (session == null)
> {
>       // Create session using session factory
>       session = getSessionFactory().newSession(request);
>       // Set the client Locale for this session
>       session.setLocale(request.getLocale());
> What I propose is to change the constructor from Session/ WebSession to take 
> in a Locale parameter as well. That would make it possible for custom session 
> classes to fix the locale by setting it in the constructor. Now that is only 
> possible by overriding Session#getLocale

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to