Hi Alf,

where do you call "FacesContext.getCurrentInstance().getViewRoot().setLocale(selectedLocale)"?
Do you use the <f:view locale=""> attribute?

Refards,

Udo

Alf Felis schrieb:
Hi all,

my assumption was wrong that the session will be invalidated!

But my problem still exist... the locale will be overwritten.

Any ideas?


Regards,

Alf

-----Ursprüngliche Nachricht-----
Von: "Alf Felis" <alf.fe...@gmx.de>
Gesendet: 20.01.10 15:27:27
An: "MyFaces Discussion" <users@myfaces.apache.org>
Betreff: Re: [Tobago] Locale changed when handling exceptions


Hi again :)

I noticed, that apparently the whole session will be invalidated, because some 
other attributes will be lost, too.

Is there any "parameter" or something else to disable this behaviour?

Regards,

Alf


----- original Nachricht --------

Betreff: [Tobago] Locale changed when handling exceptions
Gesendet: Mi, 20. Jan 2010
Von: Alf Felis<alf.fe...@gmx.de>

Hi all,

I have a problem with the locale and the error handling.

My application provides the possibility to choose the preferred language.
I set the selected locale with the following code

FacesContext.getCurrentInstance().getViewRoot().setLocale(selectedLocale);

Everything works fine until the error page is called.
For any exception I use one error page set within the web.xml.

    <error-page>
        <exception-type>java.lang.Throwable</exception-type>
        <location>/faces/ErrorPage.jsp</location>
    </error-page>

If now an error occurred the locale set by my code above will be overridden
and set to the browser locale.

How can I avoid this?

Best regards,

Alf

--- original Nachricht Ende ----

Reply via email to