Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.seam.core
Class LocaleSelector

    java.lang.Object
      org.jboss.seam.core.AbstractMutable
          org.jboss.seam.core.Selector
              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 Selector

Selects the current user's locale

Author:
  Gavin King
See Also:
  Serialized Form

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
`clearCookieValue, getCookie, getCookieMaxAge, getCookieValue, getCookieValueIfEnabled, isCookieEnabled, setCookieEnabled, setCookieMaxAge, setCookieValueIfEnabled`

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

### LocaleSelector

    public LocaleSelector()

Method Detail

### initLocale

    @Create
    public void initLocale()

### getCookieName

    protected String getCookieName()

  Description copied from class: `Selector`
  Override to define the cookie name

  Specified by:
    `getCookieName` in class `Selector`

### select

    public void select()

  Force the resource bundle to reload, using the current locale, and raise the org.jboss.seam.localeSelected event.

### 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()

  Get the selected locale

### 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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD