站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss Seam 1.2.1 API 英文版文档

ThemeSelector (JBoss Seam API Documentation) - JBoss Seam 1.2.1 API 英文版文档


org.jboss.seam.theme
Class ThemeSelector

java.lang.Object
  extended by org.jboss.seam.core.AbstractMutable
      extended by org.jboss.seam.core.Selector
          extended by org.jboss.seam.theme.ThemeSelector
All Implemented Interfaces:
Serializable, Mutable

@Scope(value=SESSION)
@Name(value="org.jboss.seam.theme.themeSelector")
@Intercept(value=NEVER)
@Install(precedence=0)
public class ThemeSelector
extends Selector

Selects the current user's theme

Author:
Gavin King
See Also:
Serialized Form

Constructor Summary
ThemeSelector()
           
 
Method Summary
 String[] getAvailableThemes()
           
protected  String getCookieName()
          Override to define the cookie name
 String getLocalizedThemeName(String name)
          Get the localized name of the named theme, by looking for org.jboss.seam.theme.<name> in the Seam resource bundle
 String getTheme()
          Get the name of the current theme
 ResourceBundle getThemeResourceBundle()
          Get the resource bundle for the theme
 List<javax.faces.model.SelectItem> getThemes()
          Get a selectable list of available themes for display in the UI
 void initDefaultTheme()
           
static ThemeSelector instance()
           
 void select()
          Recreate the JSF view, using the new theme, and raise the org.jboss.seam.themeSelected event
 void setAvailableThemes(String[] themeNames)
           
 void setTheme(String themeName)
           
 
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

ThemeSelector

public ThemeSelector()
Method Detail

initDefaultTheme

@Create
public void initDefaultTheme()

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()
Recreate the JSF view, using the new theme, and raise the org.jboss.seam.themeSelected event


getThemes

public List<javax.faces.model.SelectItem> getThemes()
Get a selectable list of available themes for display in the UI


getTheme

public String getTheme()
Get the name of the current theme


setTheme

public void setTheme(String themeName)

setAvailableThemes

public void setAvailableThemes(String[] themeNames)

getThemeResourceBundle

public ResourceBundle getThemeResourceBundle()
Get the resource bundle for the theme


getLocalizedThemeName

public String getLocalizedThemeName(String name)
Get the localized name of the named theme, by looking for org.jboss.seam.theme.<name> in the Seam resource bundle


instance

public static ThemeSelector instance()

getAvailableThemes

public String[] getAvailableThemes()