当前页面:
在线文档首页 >
JBoss Seam 1.1.0 API 英文版文档
LocaleSelector (JBoss Seam API Documentation) - JBoss Seam 1.1.0 API 英文版文档
org.jboss.seam.core
Class LocaleSelector
java.lang.Object
org.jboss.seam.core.AbstractMutable
org.jboss.seam.core.LocaleSelector
- All Implemented Interfaces:
- Serializable, Mutable
@Scope(value=SESSION)
@Name(value="org.jboss.seam.core.localeSelector")
@Intercept(value=NEVER)
@Install(precedence=0)
public class LocaleSelector
- extends AbstractMutable
- implements Serializable
Selects the current user's locale
- Author:
- Gavin King
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocaleSelector
public LocaleSelector()
initLocale
@Create
public void initLocale()
select
public void select()
- Force the resource bundle to reload, using the current locale
selectLanguage
public void selectLanguage(String language)
- Set the language and force resource bundle reload, useful for quick action links:
<h:commandLink value="DE" action="#{localeSelector.selectLanguage('de')}"/>"/>
calculateLocale
public Locale calculateLocale(Locale jsfLocale)
setLocale
public void setLocale(Locale locale)
getLocaleString
public String getLocaleString()
setLocaleString
public void setLocaleString(String localeString)
getSupportedLocales
public List<javax.faces.model.SelectItem> getSupportedLocales()
getLocale
public Locale getLocale()
instance
public static LocaleSelector instance()
getCountry
public String getCountry()
setCountry
public void setCountry(String country)
getLanguage
public String getLanguage()
setLanguage
public void setLanguage(String language)
getVariant
public String getVariant()
setVariant
public void setVariant(String variant)
isCookieEnabled
public boolean isCookieEnabled()
setCookieEnabled
public void setCookieEnabled(boolean cookieEnabled)
getCookieMaxAge
protected int getCookieMaxAge()
setCookieMaxAge
protected void setCookieMaxAge(int cookieMaxAge)