Ho well, I didn't understood correctly your question, sorry.

Have you tried tho use a custom WebSession ?

- in your WebApplication class overload the newSession method :

    @Override
    public Session newSession(Request request, Response response) {
        return new YourCustomSession(this, request);
    }

- create the class YourCustomSession extending WebSession, then override
getLocale() :

    @Override
    public Locale getLocale() {
        // TODO Auto-generated method stub
        return super.getLocale();
    }

in YourCustomSession you have access to the Request locale that you can
restrict to only supported values in your custom getLocale().

2009/10/19 Per Newgro <[email protected]>

> Hi Olivier
>
>> And the overload of getLocale() would'nt work ?
>>
>>
>>
> I don't see how it could solve my problem. What i try is to filter the
> locales assignable to session.
> It will be assigned in Application.newSession(Request, Response) by usage
> of the Accepted-Langauge
> value in header of response. That seems the right place to ensure only
> supported languages.
>
> WIth overwriting Page.getLocale() i don't see the way on howto get the
> accepted locales of client browser.
>
> Thanks
>
> Per
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to