1 Reply Latest reply on Aug 21, 2009 12:06 PM by Tamás Blummer

    Locale is lost after exception in Renderer.render()

    Vladimir Kovalyuk Apprentice

      If email is rendered and sent to the recipient without exception the following expression  returns ru:


      If exception was thrown this expression returns en and page turns to English.

      Tried to investigate the problem but haven't realized yet what code updates locale.

      Is it a bug? How to work around that?

        • 1. Re: Locale is lost after exception in Renderer.render()
          Tamás Blummer Newbie

          Following solved for me a similar problem: Sending e-mail using the injected renderer always used the default language of the application.

          It seems to me localeSelector should set application locale by default.


          FacesContext facesContext;
          LocaleSelector localeSelector;
          javax.faces.context.FacesContext f = (javax.faces.context.FacesContext)facesContext;
          f.getApplication ().setDefaultLocale (localeSelector.getLocale ());