@Override public Locale getDefaultLocale() { return delegate().getDefaultLocale(); }
@Override public Locale getDefaultLocale() { return application.getDefaultLocale(); }
@Override public Locale getDefaultLocale() { return this.wrappedApplication.getDefaultLocale(); }
/** * {@inheritDoc} */ public Locale getDefaultLocale() { return wrapped.getDefaultLocale(); }
/** {@inheritDoc} */ public Locale calculateLocale(FacesContext context) { Locale locale = context.getApplication().getDefaultLocale(); if (locale == null) { locale = Locale.getDefault(); } return locale; }
/** {@inheritDoc} */ public Locale calculateLocale(FacesContext context) { Locale locale = context.getApplication().getDefaultLocale(); if (locale == null) { locale = Locale.getDefault(); } return locale; }
/** {@inheritDoc} */ public Locale calculateLocale(FacesContext context) { Locale locale = context.getApplication().getDefaultLocale(); if (locale == null) { locale = Locale.getDefault(); } return locale; }
/** * <p class="changed_added_2_0">The default behavior of this method * is to call {@link Application#getDefaultLocale} on the * wrapped {@link Application} object.</p> */ @Override public Locale getDefaultLocale() { return getWrapped().getDefaultLocale(); }
@Override public Locale getDefaultLocale() { return getWrapped().getDefaultLocale(); }
/** * <p class="changed_added_2_0">The default behavior of this method * is to call {@link Application#getDefaultLocale} on the * wrapped {@link Application} object.</p> */ @Override public Locale getDefaultLocale() { return getWrapped().getDefaultLocale(); }
/** * <p class="changed_added_2_0">The default behavior of this method * is to call {@link Application#getDefaultLocale} on the * wrapped {@link Application} object.</p> */ @Override public Locale getDefaultLocale() { return getWrapped().getDefaultLocale(); }
public Object getAsObject(final FacesContext fc, final UIComponent component, final String value) { if (StringUtils.isBlank(value)) { return fc.getApplication().getDefaultLocale(); } return getLocaleObject(value, separator); }
public Locale getLocale() { FacesContext facesContext = FacesContext.getCurrentInstance(); Locale locale = facesContext.getViewRoot().getLocale(); if (locale == null) { locale = facesContext.getApplication().getDefaultLocale(); } return (locale); }
/** * <p class="changed_added_2_0"> * The default behavior of this method is to call {@link Application#getDefaultLocale} on the * wrapped {@link Application} object. * </p> */ @Override public Locale getDefaultLocale() { return getWrapped().getDefaultLocale(); }
/** * <p class="changed_added_2_0">The default behavior of this method * is to call {@link Application#getDefaultLocale} on the * wrapped {@link Application} object.</p> */ @Override public Locale getDefaultLocale() { return getWrapped().getDefaultLocale(); }
public Locale getDefaultLocale() { weaveDelegate(); return _delegate.getDefaultLocale(); }
private Locale getLocale() { final FacesContext context = FacesContext.getCurrentInstance(); final Locale locale = context.getViewRoot().getLocale(); if (locale != null) { return locale; } return context.getApplication().getDefaultLocale(); }
protected Locale getLocaleFromDefaultLocale(FacesContext context) { Locale defaultLocale = context.getApplication().getDefaultLocale(); for (Iterator locales = context.getExternalContext() .getRequestLocales(); locales.hasNext();) { Locale reqLocale = (Locale) locales.next(); if (isMatchLocale(reqLocale, defaultLocale)) { return defaultLocale; } } return null; }
@Test public void testProducesDefaultLocaleCurrentFacesContext() { new MockFacesContext().set(); Locale actualDefaultLocale = FacesContext.getCurrentInstance().getApplication().getDefaultLocale(); Locale producedDefaultLocale = defaultLocaleInstance.get(); // verify we have same object through proxy by comparing hash codes assertEquals(actualDefaultLocale, producedDefaultLocale); }
@Test public void testReturnsDefaultLocale() { new MockFacesContext().set(); FacesContext ctx = FacesContext.getCurrentInstance(); assertSame(new LocaleProducer().getDefaultFacesLocale(ctx), ctx.getApplication().getDefaultLocale()); }