java.lang.Object
de.agilecoders.wicket.core.settings.SessionThemeProvider
de.agilecoders.wicket.core.settings.CookieThemeProvider
- All Implemented Interfaces:
ActiveThemeProvider
#### Description
An
ActiveThemeProvider implementation that stores the active theme
in the session and in a browser cookie for durability.-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.CookieThemeProvider(String cookieName, CookieDefaults cookieDefaults) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringLoads the name of theme from the session's styleprotected voidstoreThemeName(String themeName) Stores the theme name in the session's styleMethods inherited from class de.agilecoders.wicket.core.settings.SessionThemeProvider
assertBoundSession, getActiveTheme, setActiveTheme, setActiveTheme
-
Constructor Details
-
CookieThemeProvider
public CookieThemeProvider()Constructor.Uses default cookie name and settings
-
CookieThemeProvider
Constructor.Sets custom cookie name and settings
- Parameters:
cookieName- The name of the cookie that will keep the theme name as a valuecookieDefaults- The settings for the cookie (age, domain, path, etc.)
-
-
Method Details
-
loadThemeName
Description copied from class:SessionThemeProviderLoads the name of theme from the session's style- Overrides:
loadThemeNamein classSessionThemeProvider- Returns:
- The session's style
-
storeThemeName
Description copied from class:SessionThemeProviderStores the theme name in the session's style- Overrides:
storeThemeNamein classSessionThemeProvider- Parameters:
themeName- The name of the current theme
-