class SpringSelectFieldTagProcessor extends AbstractSpringFieldTagProcessor {


    static final String OPTION_IN_SELECT_ATTR_NAME = "%%OPTION_IN_SELECT_ATTR_NAME%%";
    static final String OPTION_IN_SELECT_ATTR_VALUE = "%%OPTION_IN_SELECT_ATTR_VALUE%%";



    public SpringSelectFieldTagProcessor(final String dialectPrefix) {
        super(dialectPrefix, SELECT_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>}



    private final boolean isDisabled(final IProcessableElementTag tag) {
        // Disabled = attribute "disabled" exists
        return tag.hasAttribute(this.disabledAttributeDefinition.getAttributeName());
    }


}


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

        final String id = computeId(context, tag, name, false);

        final boolean multiple = tag.hasAttribute(this.multipleAttributeDefinition.getAttributeName());

        StandardProcessorUtils.setAttribute(structureHandler, this.idAttributeDefinition, ID_ATTR_NAME, id); // No need to escape: this comes from an existing 'id' or from a token
        StandardProcessorUtils.setAttribute(structureHandler, this.nameAttributeDefinition, NAME_ATTR_NAME, name); // No need to escape: this is a java-valid token

        structureHandler.setLocalVariable(OPTION_IN_SELECT_ATTR_NAME, attributeName);
        structureHandler.setLocalVariable(OPTION_IN_SELECT_ATTR_VALUE, attributeValue);

        if (multiple && !isDisabled(tag)) {

            final IModelFactory modelFactory = context.getModelFactory();

            final IModel hiddenMethodElementModel = modelFactory.createModel();

            final String hiddenName = WebDataBinder.DEFAULT_FIELD_MARKER_PREFIX + name;
            final String type = "hidden";
            final String value =
                    RequestDataValueProcessorUtils.processFormFieldValue(context, hiddenName, "1", type);

            final Map<String,String> hiddenAttributes = new LinkedHashMap<String, String>(4,1.0f);
            hiddenAttributes.put(TYPE_ATTR_NAME, type);
            hiddenAttributes.put(NAME_ATTR_NAME, hiddenName);
            hiddenAttributes.put(VALUE_ATTR_NAME, value);

            final IStandaloneElementTag hiddenElementTag =
                    modelFactory.createStandaloneElementTag("input", hiddenAttributes, AttributeValueQuotes.DOUBLE, false, true);

            hiddenMethodElementModel.add(hiddenElementTag);

            // We insert this hidden before because <select>'s are open element (with body), and if we insert it
            // after the element, we would be inserting the <input type="hidden"> inside the <select>, which would
            // incorrect...
            structureHandler.insertBefore(hiddenMethodElementModel);

        }

    
<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