Class SessionThemeResolver
java.lang.Object
org.springframework.web.servlet.theme.AbstractThemeResolver
org.springframework.web.servlet.theme.SessionThemeResolver
- All Implemented Interfaces:
- ThemeResolver
Deprecated.
as of 6.0 in favor of using CSS, without direct replacement
ThemeResolver implementation that
 uses a theme attribute in the user's session in case of a custom setting,
 with a fallback to the default theme. This is most appropriate if the
 application needs user sessions anyway.
 Custom controllers can override the user's theme by calling
 setThemeName, e.g. responding to a theme change request.
- Since:
- 17.06.2003
- Author:
- Jean-Pierre Pawlak, Juergen Hoeller
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.Name of the session attribute that holds the theme name.Fields inherited from class org.springframework.web.servlet.theme.AbstractThemeResolverORIGINAL_DEFAULT_THEME_NAME
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionresolveThemeName(HttpServletRequest request) Deprecated.Resolve the current theme name via the given request.voidsetThemeName(HttpServletRequest request, HttpServletResponse response, String themeName) Deprecated.Set the current theme name to the given one.Methods inherited from class org.springframework.web.servlet.theme.AbstractThemeResolvergetDefaultThemeName, setDefaultThemeName
- 
Field Details- 
THEME_SESSION_ATTRIBUTE_NAMEDeprecated.Name of the session attribute that holds the theme name. Only used internally by this implementation. UseRequestContext(Utils).getTheme()to retrieve the current theme in controllers or views.
 
- 
- 
Constructor Details- 
SessionThemeResolverpublic SessionThemeResolver()Deprecated.
 
- 
- 
Method Details- 
resolveThemeNameDeprecated.Description copied from interface:ThemeResolverResolve the current theme name via the given request. Should return a default theme as fallback in any case.- Parameters:
- request- the request to be used for resolution
- Returns:
- the current theme name
 
- 
setThemeNamepublic void setThemeName(HttpServletRequest request, @Nullable HttpServletResponse response, @Nullable String themeName) Deprecated.Description copied from interface:ThemeResolverSet the current theme name to the given one.- Parameters:
- request- the request to be used for theme name modification
- response- the response to be used for theme name modification
- themeName- the new theme name (- nullor empty to reset it)
 
 
-