[ http://issues.apache.org/jira/browse/WICKET-151?page=comments#action_12457039 ] Eelco Hillenius commented on WICKET-151: ----------------------------------------
Oh, but Session always had a setter. So the current situation is kind of flaky anyway. Not that I don't care much, as I don't think other places where we do this - e.g. isVisible - hurts users in practice. You can implement the fixed locale now anyway, and you can always get the current request by doing Request.get(). I'm more concerned about what Johan said; it might break a bunch. In that respect I'm ready to drop this again. It's not like I'm looking for more work. I just encountered this as I need to fix the locale for the day project, and I had to think about how I would explain that you can't call setLocale and expect it to work in Wicket In Action. Just ugly if you ask me. > 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
