Class FeatureActiveAttrProcessor
- java.lang.Object
-
- org.thymeleaf.processor.AbstractProcessor
-
- org.thymeleaf.processor.element.AbstractElementTagProcessor
-
- org.thymeleaf.processor.element.AbstractAttributeTagProcessor
-
- org.thymeleaf.standard.processor.AbstractStandardConditionalVisibilityTagProcessor
-
- org.togglz.spring.boot.actuate.thymeleaf.processor.AbstractFeatureAttrProcessor
-
- org.togglz.spring.boot.actuate.thymeleaf.processor.FeatureActiveAttrProcessor
-
- All Implemented Interfaces:
org.thymeleaf.processor.element.IElementProcessor,org.thymeleaf.processor.element.IElementTagProcessor,org.thymeleaf.processor.IProcessor
public class FeatureActiveAttrProcessor extends AbstractFeatureAttrProcessor
Processor for theactiveattribute inTogglzDialect. It shows or hides the given DOM container based on feature state:
<span togglz:active="FEATURE"> Only visible when FEATURE is active. </span>Features may also be specified dynamically by using expressions:
<span togglz:active="${feature}"> Only visible when feature resolved by evaluating ${feature} is active. </span>When using Thymeleaf 2.0.x, literal feature names have to be quoted with single quotes. Thymeleaf from 2.1 onward supports unquoted string literals.- Since:
- 1.0.0
- Author:
- Hendrik Heneke
-
-
Constructor Summary
Constructors Constructor Description FeatureActiveAttrProcessor(org.thymeleaf.templatemode.TemplateMode templateMode, String dialectPrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanisVisible(org.thymeleaf.context.ITemplateContext context, org.thymeleaf.model.IProcessableElementTag tag, org.thymeleaf.engine.AttributeName attributeName, String attributeValue)-
Methods inherited from class org.thymeleaf.standard.processor.AbstractStandardConditionalVisibilityTagProcessor
doProcess
-
Methods inherited from class org.thymeleaf.processor.element.AbstractAttributeTagProcessor
doProcess
-
Methods inherited from class org.thymeleaf.processor.element.AbstractElementTagProcessor
getDialectPrefix, getMatchingAttributeName, getMatchingElementName, process
-
Methods inherited from class org.thymeleaf.processor.AbstractProcessor
getPrecedence, getTemplateMode
-
-
-
-
Constructor Detail
-
FeatureActiveAttrProcessor
public FeatureActiveAttrProcessor(org.thymeleaf.templatemode.TemplateMode templateMode, String dialectPrefix)
-
-
Method Detail
-
isVisible
protected boolean isVisible(org.thymeleaf.context.ITemplateContext context, org.thymeleaf.model.IProcessableElementTag tag, org.thymeleaf.engine.AttributeName attributeName, String attributeValue)- Specified by:
isVisiblein classorg.thymeleaf.standard.processor.AbstractStandardConditionalVisibilityTagProcessor
-
-