|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.seam.core.AbstractMutable org.jboss.seam.core.Selector org.jboss.seam.core.LocaleSelector
@Scope(value=SESSION) @Name(value="org.jboss.seam.core.localeSelector") @Intercept(value=NEVER) @Install(precedence=0) public class LocaleSelector
Selects the current user's locale
Constructor Summary | |
---|---|
LocaleSelector()
|
Method Summary | |
---|---|
Locale |
calculateLocale(Locale jsfLocale)
|
protected String |
getCookieName()
Override to define the cookie name |
String |
getCountry()
|
String |
getLanguage()
|
Locale |
getLocale()
Get the selected locale |
String |
getLocaleString()
|
List<javax.faces.model.SelectItem> |
getSupportedLocales()
|
String |
getVariant()
|
void |
initLocale()
|
static LocaleSelector |
instance()
|
void |
select()
Force the resource bundle to reload, using the current locale, and raise the org.jboss.seam.localeSelected event. |
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')}"/>"/> |
void |
setCountry(String country)
|
void |
setLanguage(String language)
|
void |
setLocale(Locale locale)
|
void |
setLocaleString(String localeString)
|
void |
setVariant(String variant)
|
Methods inherited from class org.jboss.seam.core.Selector |
---|
getCookieMaxAge, getCookieValue, isCookieEnabled, setCookieEnabled, setCookieMaxAge, setCookieValue |
Methods inherited from class org.jboss.seam.core.AbstractMutable |
---|
clearDirty, setDirty, setDirty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocaleSelector()
Method Detail |
---|
@Create public void initLocale()
protected String getCookieName()
Selector
getCookieName
in class Selector
public void select()
public void selectLanguage(String language)
public Locale calculateLocale(Locale jsfLocale)
public void setLocale(Locale locale)
public String getLocaleString()
public void setLocaleString(String localeString)
public List<javax.faces.model.SelectItem> getSupportedLocales()
public Locale getLocale()
public static LocaleSelector instance()
public String getCountry()
public void setCountry(String country)
public String getLanguage()
public void setLanguage(String language)
public String getVariant()
public void setVariant(String variant)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |