Deprecated
since 6.0.
as of 6.0 in favor of using CSS, without direct replacement
org.springframework.web.servlet.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.
setThemeName
| Modifier and Type | Field and Description |
|---|---|
| public static final String | THEME_SESSION_ATTRIBUTE_NAME
Name of the session attribute that holds the theme name. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | resolveThemeName(HttpServletRequest
the request to be used for resolution request)Implements org. Resolve the current theme name via the given request. |
| public void | setThemeName(HttpServletRequest
the request to be used for theme name modification request, HttpServletResponse the response to be used for theme name modification response, String the new theme name ( themeName)null or empty to reset it)Implements org. Set the current theme name to the given one. |
| THEME_SESSION_ATTRIBUTE_NAME | back to summary |
|---|---|
| public static final String THEME_SESSION_ATTRIBUTE_NAME Name of the session attribute that holds the theme name.
Only used internally by this implementation.
Use | |
| SessionThemeResolver | back to summary |
|---|---|
| public SessionThemeResolver() | |
| resolveThemeName | back to summary |
|---|---|
| public String resolveThemeName(HttpServletRequest request) Implements org. Doc from org. Resolve the current theme name via the given request. Should return a default theme as fallback in any case.
| |
| setThemeName | back to summary |
|---|---|
| public void setThemeName(HttpServletRequest request, HttpServletResponse response, String themeName) Implements org. Doc from org. Set the current theme name to the given one.
| |