class SpringOptionFieldTagProcessor extends AbstractSpringFieldTagProcessor {




    public SpringOptionFieldTagProcessor(final String dialectPrefix) {
        super(dialectPrefix, OPTION_TAG_NAME, null, null, true);
    }



    @Override
    protected void doProcess(final ITemplateContext context,
                             final IProcessableElementTag tag,
                             final AttributeName attributeName, final String attributeValue,
                             final IThymeleafBindStatus bindStatus, final IElementTagStructureHandler structureHandler) {<FILL_FUNCTION_BODY>}


}


        String name = bindStatus.getExpression();
        name = (name == null? "" : name);

        final String value = tag.getAttributeValue(this.valueAttributeDefinition.getAttributeName());
        if (value == null) {
            throw new TemplateProcessingException(
                    "Attribute \"value\" is required in \"option\" tags");
        }

        final boolean selected =
                SpringSelectedValueComparator.isSelected(bindStatus, HtmlEscape.unescapeHtml(value));

        StandardProcessorUtils.setAttribute(
                structureHandler,
                this.valueAttributeDefinition, VALUE_ATTR_NAME,
                RequestDataValueProcessorUtils.processFormFieldValue(context, name, value, "option"));

        if (selected) {
            StandardProcessorUtils.setAttribute(structureHandler, this.selectedAttributeDefinition, SELECTED_ATTR_NAME, SELECTED_ATTR_NAME);
        } else {
            structureHandler.removeAttribute(this.selectedAttributeDefinition.getAttributeName());
        }

    
<methods>public void <init>(java.lang.String, java.lang.String, java.lang.String, java.lang.String[], boolean) ,public void setAttributeDefinitions(org.thymeleaf.engine.AttributeDefinitions) <variables>public static final java.lang.String ATTR_NAME,public static final int ATTR_PRECEDENCE,protected static final java.lang.String CHECKED_ATTR_NAME,protected static final java.lang.String DISABLED_ATTR_NAME,protected static final java.lang.String ID_ATTR_NAME,protected static final java.lang.String INPUT_TAG_NAME,protected static final java.lang.String MULTIPLE_ATTR_NAME,protected static final java.lang.String NAME_ATTR_NAME,protected static final java.lang.String OPTION_TAG_NAME,protected static final java.lang.String SELECTED_ATTR_NAME,protected static final java.lang.String SELECT_TAG_NAME,private static final org.thymeleaf.templatemode.TemplateMode TEMPLATE_MODE,protected static final java.lang.String TEXTAREA_TAG_NAME,protected static final java.lang.String TYPE_ATTR_NAME,protected static final java.lang.String VALUE_ATTR_NAME,protected org.thymeleaf.engine.AttributeDefinition checkedAttributeDefinition,protected org.thymeleaf.engine.AttributeDefinition disabledAttributeDefinition,private final non-sealed java.lang.String discriminatorAttrName,private final non-sealed java.lang.String[] discriminatorAttrValues,private org.thymeleaf.engine.AttributeDefinition discriminatorAttributeDefinition,protected org.thymeleaf.engine.AttributeDefinition idAttributeDefinition,protected org.thymeleaf.engine.AttributeDefinition multipleAttributeDefinition,protected org.thymeleaf.engine.AttributeDefinition nameAttributeDefinition,private final non-sealed boolean removeAttribute,protected org.thymeleaf.engine.AttributeDefinition selectedAttributeDefinition,protected org.thymeleaf.engine.AttributeDefinition typeAttributeDefinition,protected org.thymeleaf.engine.AttributeDefinition valueAttributeDefinition