protected void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { final String newAttributeValue = EscapedAttributeUtils.escapeAttribute(getTemplateMode(), expressionResult == null ? null : expressionResult.toString()); // These attributes are "removable if empty", so we simply remove the target attribute... if (newAttributeValue == null || newAttributeValue.length() == 0) { // We are removing the equivalent attribute name, without the prefix... structureHandler.removeAttribute(this.targetAttributeDefinition.getAttributeName()); structureHandler.removeAttribute(attributeName); } else { // We are setting the equivalent attribute name, without the prefix... StandardProcessorUtils.replaceAttribute( structureHandler, attributeName, this.targetAttributeDefinition, this.targetAttrCompleteName, (newAttributeValue == null ? "" : newAttributeValue)); } }
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { final String newAttributeValue = EscapedAttributeUtils.escapeAttribute(getTemplateMode(), expressionResult == null ? null : expressionResult.toString()); // These attributes might be "removable if empty", in which case we would simply remove the target attribute... if (this.removeIfEmpty && (newAttributeValue == null || newAttributeValue.length() == 0)) { // We are removing the equivalent attribute name, without the prefix... structureHandler.removeAttribute(this.targetAttributeDefinition.getAttributeName()); structureHandler.removeAttribute(attributeName); } else { // We are setting the equivalent attribute name, without the prefix... StandardProcessorUtils.replaceAttribute( structureHandler, attributeName, this.targetAttributeDefinition, this.targetAttrCompleteName, (newAttributeValue == null ? "" : newAttributeValue)); } }
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { String newAttributeValue = HtmlEscape.escapeHtml4Xml(expressionResult == null ? "" : expressionResult.toString()); // Let RequestDataValueProcessor modify the attribute value if needed newAttributeValue = RequestDataValueProcessorUtils.processUrl(context, newAttributeValue); // Set the real, non prefixed attribute StandardProcessorUtils.replaceAttribute(structureHandler, attributeName, this.targetAttributeDefinition, ATTR_NAME, (newAttributeValue == null ? "" : newAttributeValue)); }
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { String newAttributeValue = HtmlEscape.escapeHtml4Xml(expressionResult == null ? "" : expressionResult.toString()); // Let RequestDataValueProcessor modify the attribute value if needed newAttributeValue = RequestDataValueProcessorUtils.processUrl(context, newAttributeValue); // Set the real, non prefixed attribute StandardProcessorUtils.replaceAttribute(structureHandler, attributeName, this.targetAttributeDefinition, ATTR_NAME, (newAttributeValue == null ? "" : newAttributeValue)); }
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { String newAttributeValue = HtmlEscape.escapeHtml4Xml(expressionResult == null ? "" : expressionResult.toString()); // Let RequestDataValueProcessor modify the attribute value if needed newAttributeValue = RequestDataValueProcessorUtils.processUrl(context, newAttributeValue); // Set the real, non prefixed attribute StandardProcessorUtils.replaceAttribute(structureHandler, attributeName, this.targetAttributeDefinition, ATTR_NAME, (newAttributeValue == null ? "" : newAttributeValue)); }
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { String newAttributeValue = HtmlEscape.escapeHtml4Xml(expressionResult == null ? "" : expressionResult.toString()); // Let RequestDataValueProcessor modify the attribute value if needed newAttributeValue = RequestDataValueProcessorUtils.processUrl(context, newAttributeValue); // Set the real, non prefixed attribute StandardProcessorUtils.replaceAttribute(structureHandler, attributeName, this.targetAttributeDefinition, ATTR_NAME, (newAttributeValue == null? "" : newAttributeValue)); }
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { String newAttributeValue = HtmlEscape.escapeHtml4Xml(expressionResult == null ? "" : expressionResult.toString()); // Let RequestDataValueProcessor modify the attribute value if needed newAttributeValue = RequestDataValueProcessorUtils.processUrl(context, newAttributeValue); // Set the real, non prefixed attribute StandardProcessorUtils.replaceAttribute(structureHandler, attributeName, this.targetAttributeDefinition, ATTR_NAME, (newAttributeValue == null? "" : newAttributeValue)); }
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { String newAttributeValue = HtmlEscape.escapeHtml4Xml(expressionResult == null ? "" : expressionResult.toString()); // Let RequestDataValueProcessor modify the attribute value if needed newAttributeValue = RequestDataValueProcessorUtils.processUrl(context, newAttributeValue); // Set the real, non prefixed attribute StandardProcessorUtils.replaceAttribute(structureHandler, attributeName, this.targetAttributeDefinition, ATTR_NAME, (newAttributeValue == null? "" : newAttributeValue)); }
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { String newAttributeValue = HtmlEscape.escapeHtml4Xml(expressionResult == null ? "" : expressionResult.toString()); // Let RequestDataValueProcessor modify the attribute value if needed newAttributeValue = RequestDataValueProcessorUtils.processUrl(context, newAttributeValue); // Set the real, non prefixed attribute StandardProcessorUtils.replaceAttribute(structureHandler, attributeName, this.targetAttributeDefinition, ATTR_NAME, (newAttributeValue == null ? "" : newAttributeValue)); }
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { String newAttributeValue = HtmlEscape.escapeHtml4Xml(expressionResult == null ? "" : expressionResult.toString()); // Let RequestDataValueProcessor modify the attribute value if needed newAttributeValue = RequestDataValueProcessorUtils.processUrl(context, newAttributeValue); // Set the real, non prefixed attribute StandardProcessorUtils.replaceAttribute(structureHandler, attributeName, this.targetAttributeDefinition, ATTR_NAME, (newAttributeValue == null? "" : newAttributeValue)); }
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { String newAttributeValue = HtmlEscape.escapeHtml4Xml(expressionResult == null ? "" : expressionResult.toString()); // Let RequestDataValueProcessor modify the attribute value if needed newAttributeValue = RequestDataValueProcessorUtils.processUrl(context, newAttributeValue); // Set the real, non prefixed attribute StandardProcessorUtils.replaceAttribute(structureHandler, attributeName, this.targetAttributeDefinition, ATTR_NAME, (newAttributeValue == null? "" : newAttributeValue)); }
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { String newAttributeValue = HtmlEscape.escapeHtml4Xml(expressionResult == null ? "" : expressionResult.toString()); // Let RequestDataValueProcessor modify the attribute value if needed newAttributeValue = RequestDataValueProcessorUtils.processUrl(context, newAttributeValue); // Set the real, non prefixed attribute StandardProcessorUtils.replaceAttribute(structureHandler, attributeName, this.targetAttributeDefinition, ATTR_NAME, (newAttributeValue == null ? "" : newAttributeValue)); }
StandardProcessorUtils.replaceAttribute( structureHandler, attributeName, this.targetAttributeDefinition, TARGET_ATTR_NAME, (newAttributeValue == null? "" : newAttributeValue));
StandardProcessorUtils.replaceAttribute( structureHandler, attributeName, this.targetAttributeDefinition, TARGET_ATTR_NAME, (newAttributeValue == null? "" : newAttributeValue));
StandardProcessorUtils.replaceAttribute( structureHandler, attributeName, this.targetAttributeDefinition, TARGET_ATTR_NAME, (newAttributeValue == null? "" : newAttributeValue));
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { String newAttributeValue = HtmlEscape.escapeHtml4Xml(expressionResult == null ? "" : expressionResult.toString()); // Let RequestDataValueProcessor modify the attribute value if needed, but only in the case we don't also have // a 'th:field' - in such case, we will let th:field do its job if (!tag.hasAttribute(this.fieldAttributeDefinition.getAttributeName())) { // We will need to know the 'name' and 'type' attribute values in order to (potentially) modify the 'value' final String nameValue = tag.getAttributeValue(this.nameAttributeDefinition.getAttributeName()); final String typeValue = tag.getAttributeValue(this.typeAttributeDefinition.getAttributeName()); newAttributeValue = RequestDataValueProcessorUtils.processFormFieldValue(context, nameValue, newAttributeValue, typeValue); } // Set the 'value' attribute StandardProcessorUtils.replaceAttribute(structureHandler, attributeName, this.targetAttributeDefinition, TARGET_ATTR_NAME, (newAttributeValue == null? "" : newAttributeValue)); }
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { String newAttributeValue = HtmlEscape.escapeHtml4Xml(expressionResult == null ? "" : expressionResult.toString()); // Let RequestDataValueProcessor modify the attribute value if needed, but only in the case we don't also have // a 'th:field' - in such case, we will let th:field do its job if (!tag.hasAttribute(this.fieldAttributeDefinition.getAttributeName())) { // We will need to know the 'name' and 'type' attribute values in order to (potentially) modify the 'value' final String nameValue = tag.getAttributeValue(this.nameAttributeDefinition.getAttributeName()); final String typeValue = tag.getAttributeValue(this.typeAttributeDefinition.getAttributeName()); newAttributeValue = RequestDataValueProcessorUtils.processFormFieldValue(context, nameValue, newAttributeValue, typeValue); } // Set the 'value' attribute StandardProcessorUtils.replaceAttribute(structureHandler, attributeName, this.targetAttributeDefinition, TARGET_ATTR_NAME, (newAttributeValue == null? "" : newAttributeValue)); }
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { String newAttributeValue = HtmlEscape.escapeHtml4Xml(expressionResult == null ? "" : expressionResult.toString()); // Let RequestDataValueProcessor modify the attribute value if needed, but only in the case we don't also have // a 'th:field' - in such case, we will let th:field do its job if (!tag.hasAttribute(this.fieldAttributeDefinition.getAttributeName())) { // We will need to know the 'name' and 'type' attribute values in order to (potentially) modify the 'value' final String nameValue = tag.getAttributeValue(this.nameAttributeDefinition.getAttributeName()); final String typeValue = tag.getAttributeValue(this.typeAttributeDefinition.getAttributeName()); newAttributeValue = RequestDataValueProcessorUtils.processFormFieldValue(context, nameValue, newAttributeValue, typeValue); } // Set the 'value' attribute StandardProcessorUtils.replaceAttribute(structureHandler, attributeName, this.targetAttributeDefinition, TARGET_ATTR_NAME, (newAttributeValue == null? "" : newAttributeValue)); }
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { String newAttributeValue = HtmlEscape.escapeHtml4Xml(expressionResult == null ? "" : expressionResult.toString()); // Let RequestDataValueProcessor modify the attribute value if needed, but only in the case we don't also have // a 'th:field' - in such case, we will let th:field do its job if (!tag.hasAttribute(this.fieldAttributeDefinition.getAttributeName())) { // We will need to know the 'name' and 'type' attribute values in order to (potentially) modify the 'value' final String nameValue = tag.getAttributeValue(this.nameAttributeDefinition.getAttributeName()); final String typeValue = tag.getAttributeValue(this.typeAttributeDefinition.getAttributeName()); newAttributeValue = RequestDataValueProcessorUtils.processFormFieldValue(context, nameValue, newAttributeValue, typeValue); } // Set the 'value' attribute StandardProcessorUtils.replaceAttribute(structureHandler, attributeName, this.targetAttributeDefinition, TARGET_ATTR_NAME, (newAttributeValue == null? "" : newAttributeValue)); }
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { String newAttributeValue = HtmlEscape.escapeHtml4Xml(expressionResult == null ? "" : expressionResult.toString()); // Let RequestDataValueProcessor modify the attribute value if needed, but only in the case we don't also have // a 'th:field' - in such case, we will let th:field do its job if (!tag.hasAttribute(this.fieldAttributeDefinition.getAttributeName())) { // We will need to know the 'name' and 'type' attribute values in order to (potentially) modify the 'value' final String nameValue = tag.getAttributeValue(this.nameAttributeDefinition.getAttributeName()); final String typeValue = tag.getAttributeValue(this.typeAttributeDefinition.getAttributeName()); newAttributeValue = RequestDataValueProcessorUtils.processFormFieldValue(context, nameValue, newAttributeValue, typeValue); } // Set the 'value' attribute StandardProcessorUtils.replaceAttribute(structureHandler, attributeName, this.targetAttributeDefinition, TARGET_ATTR_NAME, (newAttributeValue == null? "" : newAttributeValue)); }