Class Themes

  • public class Themes
    extends Object
    A utility object, accessed in Thymeleaf templates by the #themes expression, that provides the same features as the Spring <spring:theme> JSP tag.
    Emanuel Rabina
    • Constructor Detail

      • Themes

        public Themes​(org.thymeleaf.context.IExpressionContext context)
        Constructor, obtains the current theme and locale from the processing context for code lookups later.
        context - the processing context being used
    • Method Detail

      • code

        public String code​(String code)
        Looks up and returns the value of the given key in the properties file of the currently-selected theme.
        code - Key to look up in the theme properties file.
        The value of the code in the current theme properties file, or an empty string if the code could not be resolved.