Package org.thymeleaf.spring5.processor
Class AbstractSpringFieldTagProcessor
- Object
-
- org.thymeleaf.processor.AbstractProcessor
-
- org.thymeleaf.processor.element.AbstractElementTagProcessor
-
- org.thymeleaf.processor.element.AbstractAttributeTagProcessor
-
- org.thymeleaf.spring5.processor.AbstractSpringFieldTagProcessor
-
- All Implemented Interfaces:
org.thymeleaf.engine.IAttributeDefinitionsAware
,org.thymeleaf.processor.element.IElementProcessor
,org.thymeleaf.processor.element.IElementTagProcessor
,org.thymeleaf.processor.IProcessor
- Direct Known Subclasses:
SpringInputCheckboxFieldTagProcessor
,SpringInputFileFieldTagProcessor
,SpringInputGeneralFieldTagProcessor
,SpringInputPasswordFieldTagProcessor
,SpringInputRadioFieldTagProcessor
,SpringOptionFieldTagProcessor
,SpringSelectFieldTagProcessor
,SpringTextareaFieldTagProcessor
public abstract class AbstractSpringFieldTagProcessor extends org.thymeleaf.processor.element.AbstractAttributeTagProcessor implements org.thymeleaf.engine.IAttributeDefinitionsAware
Binds an input property with the value in the form's backing bean.Values for
th:field
attributes must be selection expressions(*{...})
, as they will be evaluated on the form backing bean and not on the context variables (model attributes in Spring MVC jargon).- Since:
- 3.0.3
- Author:
- Daniel Fernández
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTR_NAME
static int
ATTR_PRECEDENCE
protected static String
CHECKED_ATTR_NAME
protected org.thymeleaf.engine.AttributeDefinition
checkedAttributeDefinition
protected static String
DISABLED_ATTR_NAME
protected org.thymeleaf.engine.AttributeDefinition
disabledAttributeDefinition
protected static String
ID_ATTR_NAME
protected org.thymeleaf.engine.AttributeDefinition
idAttributeDefinition
protected static String
INPUT_TAG_NAME
protected static String
MULTIPLE_ATTR_NAME
protected org.thymeleaf.engine.AttributeDefinition
multipleAttributeDefinition
protected static String
NAME_ATTR_NAME
protected org.thymeleaf.engine.AttributeDefinition
nameAttributeDefinition
protected static String
OPTION_TAG_NAME
protected static String
SELECT_TAG_NAME
protected static String
SELECTED_ATTR_NAME
protected org.thymeleaf.engine.AttributeDefinition
selectedAttributeDefinition
protected static String
TEXTAREA_TAG_NAME
protected static String
TYPE_ATTR_NAME
protected org.thymeleaf.engine.AttributeDefinition
typeAttributeDefinition
protected static String
VALUE_ATTR_NAME
protected org.thymeleaf.engine.AttributeDefinition
valueAttributeDefinition
-
Constructor Summary
Constructors Constructor Description AbstractSpringFieldTagProcessor(String dialectPrefix, String elementName, String discriminatorAttrName, String[] discriminatorAttrValues, boolean removeAttribute)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected String
computeId(org.thymeleaf.context.ITemplateContext context, org.thymeleaf.model.IProcessableElementTag tag, String name, boolean sequence)
protected void
doProcess(org.thymeleaf.context.ITemplateContext context, org.thymeleaf.model.IProcessableElementTag tag, org.thymeleaf.engine.AttributeName attributeName, String attributeValue, org.thymeleaf.processor.element.IElementTagStructureHandler structureHandler)
protected abstract void
doProcess(org.thymeleaf.context.ITemplateContext context, org.thymeleaf.model.IProcessableElementTag tag, org.thymeleaf.engine.AttributeName attributeName, String attributeValue, IThymeleafBindStatus bindStatus, org.thymeleaf.processor.element.IElementTagStructureHandler structureHandler)
void
setAttributeDefinitions(org.thymeleaf.engine.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
-
-
-
-
Field Detail
-
ATTR_PRECEDENCE
public static final int ATTR_PRECEDENCE
- See Also:
- Constant Field Values
-
ATTR_NAME
public static final String ATTR_NAME
- See Also:
- Constant Field Values
-
INPUT_TAG_NAME
protected static final String INPUT_TAG_NAME
- See Also:
- Constant Field Values
-
SELECT_TAG_NAME
protected static final String SELECT_TAG_NAME
- See Also:
- Constant Field Values
-
OPTION_TAG_NAME
protected static final String OPTION_TAG_NAME
- See Also:
- Constant Field Values
-
TEXTAREA_TAG_NAME
protected static final String TEXTAREA_TAG_NAME
- See Also:
- Constant Field Values
-
ID_ATTR_NAME
protected static final String ID_ATTR_NAME
- See Also:
- Constant Field Values
-
TYPE_ATTR_NAME
protected static final String TYPE_ATTR_NAME
- See Also:
- Constant Field Values
-
NAME_ATTR_NAME
protected static final String NAME_ATTR_NAME
- See Also:
- Constant Field Values
-
VALUE_ATTR_NAME
protected static final String VALUE_ATTR_NAME
- See Also:
- Constant Field Values
-
CHECKED_ATTR_NAME
protected static final String CHECKED_ATTR_NAME
- See Also:
- Constant Field Values
-
SELECTED_ATTR_NAME
protected static final String SELECTED_ATTR_NAME
- See Also:
- Constant Field Values
-
DISABLED_ATTR_NAME
protected static final String DISABLED_ATTR_NAME
- See Also:
- Constant Field Values
-
MULTIPLE_ATTR_NAME
protected static final String MULTIPLE_ATTR_NAME
- See Also:
- Constant Field Values
-
idAttributeDefinition
protected org.thymeleaf.engine.AttributeDefinition idAttributeDefinition
-
typeAttributeDefinition
protected org.thymeleaf.engine.AttributeDefinition typeAttributeDefinition
-
nameAttributeDefinition
protected org.thymeleaf.engine.AttributeDefinition nameAttributeDefinition
-
valueAttributeDefinition
protected org.thymeleaf.engine.AttributeDefinition valueAttributeDefinition
-
checkedAttributeDefinition
protected org.thymeleaf.engine.AttributeDefinition checkedAttributeDefinition
-
selectedAttributeDefinition
protected org.thymeleaf.engine.AttributeDefinition selectedAttributeDefinition
-
disabledAttributeDefinition
protected org.thymeleaf.engine.AttributeDefinition disabledAttributeDefinition
-
multipleAttributeDefinition
protected org.thymeleaf.engine.AttributeDefinition multipleAttributeDefinition
-
-
Method Detail
-
setAttributeDefinitions
public void setAttributeDefinitions(org.thymeleaf.engine.AttributeDefinitions attributeDefinitions)
- Specified by:
setAttributeDefinitions
in interfaceorg.thymeleaf.engine.IAttributeDefinitionsAware
-
doProcess
protected void doProcess(org.thymeleaf.context.ITemplateContext context, org.thymeleaf.model.IProcessableElementTag tag, org.thymeleaf.engine.AttributeName attributeName, String attributeValue, org.thymeleaf.processor.element.IElementTagStructureHandler structureHandler)
- Specified by:
doProcess
in classorg.thymeleaf.processor.element.AbstractAttributeTagProcessor
-
doProcess
protected abstract void doProcess(org.thymeleaf.context.ITemplateContext context, org.thymeleaf.model.IProcessableElementTag tag, org.thymeleaf.engine.AttributeName attributeName, String attributeValue, IThymeleafBindStatus bindStatus, org.thymeleaf.processor.element.IElementTagStructureHandler structureHandler)
-
-