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 Details

    • ATTR_PRECEDENCE

      public static final int ATTR_PRECEDENCE
      See Also:
    • ATTR_NAME

      public static final String ATTR_NAME
      See Also:
    • INPUT_TAG_NAME

      protected static final String INPUT_TAG_NAME
      See Also:
    • SELECT_TAG_NAME

      protected static final String SELECT_TAG_NAME
      See Also:
    • OPTION_TAG_NAME

      protected static final String OPTION_TAG_NAME
      See Also:
    • TEXTAREA_TAG_NAME

      protected static final String TEXTAREA_TAG_NAME
      See Also:
    • ID_ATTR_NAME

      protected static final String ID_ATTR_NAME
      See Also:
    • TYPE_ATTR_NAME

      protected static final String TYPE_ATTR_NAME
      See Also:
    • NAME_ATTR_NAME

      protected static final String NAME_ATTR_NAME
      See Also:
    • VALUE_ATTR_NAME

      protected static final String VALUE_ATTR_NAME
      See Also:
    • CHECKED_ATTR_NAME

      protected static final String CHECKED_ATTR_NAME
      See Also:
    • SELECTED_ATTR_NAME

      protected static final String SELECTED_ATTR_NAME
      See Also:
    • DISABLED_ATTR_NAME

      protected static final String DISABLED_ATTR_NAME
      See Also:
    • MULTIPLE_ATTR_NAME

      protected static final String MULTIPLE_ATTR_NAME
      See Also:
    • 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
  • Constructor Details

    • AbstractSpringFieldTagProcessor

      public AbstractSpringFieldTagProcessor(String dialectPrefix, String elementName, String discriminatorAttrName, String[] discriminatorAttrValues, boolean removeAttribute)
  • Method Details

    • setAttributeDefinitions

      public void setAttributeDefinitions(org.thymeleaf.engine.AttributeDefinitions attributeDefinitions)
      Specified by:
      setAttributeDefinitions in interface org.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 class org.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)
    • computeId

      protected final String computeId(org.thymeleaf.context.ITemplateContext context, org.thymeleaf.model.IProcessableElementTag tag, String name, boolean sequence)