Spring Framework HierarchicalThemeSource - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework HierarchicalThemeSource class.

This code example shows how to use the following methods:getParentThemeSource, setParentThemeSource
		if (context.containsLocalBean(THEME_SOURCE_BEAN_NAME)) {
			ThemeSource themeSource = context.getBean(THEME_SOURCE_BEAN_NAME, ThemeSource.class);
			// Make ThemeSource aware of parent ThemeSource. 
			if (context.getParent() instanceof ThemeSource && themeSource instanceof HierarchicalThemeSource) {
				HierarchicalThemeSource hts = (HierarchicalThemeSource) themeSource;
				if (hts.getParentThemeSource() == null) {
					// Only set parent context as parent ThemeSource if no parent ThemeSource 
					// registered already. 
					hts.setParentThemeSource((ThemeSource) context.getParent());
			if (logger.isDebugEnabled()) {
				logger.debug("Using ThemeSource [" + themeSource + "]");
			return themeSource;
		else { 
			// Use default ThemeSource to be able to accept getTheme calls, either 
			// delegating to parent context's default or to local ResourceBundleThemeSource. 
			HierarchicalThemeSource themeSource = null;
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Spring Framework HierarchicalThemeSource Methods: