3 Replies Latest reply on Feb 6, 2006 12:30 PM by Gavin King

    Correct way to access FacesContext

    Stijn de Witt Newbie

      Hello,

      I am trying to have an entity bean return different messages based on the user's preferred locale, based on settings in the user's profile, cookie, browser preferences, and default locale, in that order. I am currently just making a singleton localizer class that accesses the facescontext like this:

      FacesContext context = FacesContext.getCurrentInstance();
      Locale requestLocale = context.getExternalContext().getRequestLocale();

      Is there a 'Seam way' of doing this? I noticed a Seam FacesContext in the api docs. Or is there a smarter way of handling i18n with Seam altogether?

      Thanks for building such a promising framework, keep it up!