import java.util.ResourceBundle;
import javax.faces.context.FacesContext;
import javax.faces.component.UIViewRoot;
import java.util.Locale;
private static ResourceBundle getBundle() {
FacesContext ctx = getFacesContext();
UIViewRoot uiRoot = ctx.getViewRoot();
Locale locale = uiRoot.getLocale();
ClassLoader ldr = Thread.currentThread().getContextClassLoader();
return ResourceBundle.getBundle(ctx.getApplication().getMessageBundle(), locale, ldr);
}
import javax.faces.context.FacesContext;
import javax.faces.component.UIViewRoot;
import java.util.Locale;
private static ResourceBundle getBundle() {
FacesContext ctx = getFacesContext();
UIViewRoot uiRoot = ctx.getViewRoot();
Locale locale = uiRoot.getLocale();
ClassLoader ldr = Thread.currentThread().getContextClassLoader();
return ResourceBundle.getBundle(ctx.getApplication().getMessageBundle(), locale, ldr);
}
No comments:
Post a Comment