{
//Note: this does a double dispatch back to LocaleSelector.calculateLocale()
return facesContext.getApplication().getViewHandler().calculateLocale(facesContext);
}
ServletContexts servletContexts = ServletContexts.getInstance();
if (servletContexts!=null)
{
ServletRequest request = servletContexts.getRequest();
if (request!=null)
{
return calculateLocale( request.getLocale() );
}
}