Package org.thymeleaf.spring6.processor
Class SpringErrorClassTagProcessor
Object
org.thymeleaf.processor.AbstractProcessor
org.thymeleaf.processor.element.AbstractElementTagProcessor
org.thymeleaf.processor.element.AbstractAttributeTagProcessor
org.thymeleaf.spring6.processor.SpringErrorClassTagProcessor
- All Implemented Interfaces:
IAttributeDefinitionsAware
,IElementProcessor
,IElementTagProcessor
,IProcessor
public final class SpringErrorClassTagProcessor
extends AbstractAttributeTagProcessor
implements IAttributeDefinitionsAware
Adds the given class to the field on which this attribute is applied, if that
field contains errors. It's similar to a combination of
th:classappend
with a ${#fields.hasErrors()}
expression.- Since:
- 3.0.3
- Author:
- Daniel Fernández
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final void
doProcess
(ITemplateContext context, IProcessableElementTag tag, AttributeName attributeName, String attributeValue, IElementTagStructureHandler structureHandler) void
setAttributeDefinitions
(AttributeDefinitions attributeDefinitions) 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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.thymeleaf.processor.IProcessor
getPrecedence, getTemplateMode
-
Field Details
-
ATTR_PRECEDENCE
public static final int ATTR_PRECEDENCE- See Also:
-
ATTR_NAME
- See Also:
-
TARGET_ATTR_NAME
- See Also:
-
-
Constructor Details
-
SpringErrorClassTagProcessor
-
-
Method Details
-
setAttributeDefinitions
- Specified by:
setAttributeDefinitions
in interfaceIAttributeDefinitionsAware
-
doProcess
protected final void doProcess(ITemplateContext context, IProcessableElementTag tag, AttributeName attributeName, String attributeValue, IElementTagStructureHandler structureHandler) - Specified by:
doProcess
in classAbstractAttributeTagProcessor
-