Tabnine Logo
IElementTagStructureHandler.removeAttribute
Code IndexAdd Tabnine to your IDE (free)

How to use
removeAttribute
method
in
org.thymeleaf.processor.element.IElementTagStructureHandler

Best Java code snippets using org.thymeleaf.processor.element.IElementTagStructureHandler.removeAttribute (Showing top 20 results out of 315)

origin: thymeleaf/thymeleaf

@Override
protected void doProcess(
    final ITemplateContext context,
    final IProcessableElementTag tag,
    final IElementTagStructureHandler structureHandler) {
  // Nothing to do, this processor is just a marker. Simply remove the attribute
  final AttributeName attributeName = getMatchingAttributeName().getMatchingAttributeName();
  structureHandler.removeAttribute(attributeName);
}
origin: thymeleaf/thymeleaf

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));
  }
}
origin: thymeleaf/thymeleaf

@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));
  }
}
origin: thymeleaf/thymeleaf

@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 attributes...
  if (this.removeIfEmpty && (newAttributeValue == null || newAttributeValue.length() == 0)) {
    // We are removing the equivalent attribute name, without the prefix...
    structureHandler.removeAttribute(this.attributeOneDefinition.getAttributeName());
    structureHandler.removeAttribute(this.attributeTwoDefinition.getAttributeName());
  } else {
    // We are setting the equivalent attribute name, without the prefix...
    StandardProcessorUtils.setAttribute(structureHandler, this.attributeOneDefinition, this.attributeOneCompleteName, newAttributeValue);
    StandardProcessorUtils.setAttribute(structureHandler, this.attributeTwoDefinition, this.attributeTwoCompleteName, newAttributeValue);
  }
}
origin: thymeleaf/thymeleaf

@Override
protected final void doProcess(
    final ITemplateContext context,
    final IProcessableElementTag tag,
    final AttributeName attributeName, final String attributeValue,
    final Object expressionResult,
    final IElementTagStructureHandler structureHandler) {
  if (EvaluationUtils.evaluateAsBoolean(expressionResult)) {
    StandardProcessorUtils.setAttribute(structureHandler, this.targetAttributeDefinition, this.targetAttributeCompleteName, this.targetAttributeCompleteName);
  } else {
    structureHandler.removeAttribute(this.targetAttributeDefinition.getAttributeName());
  }
}
origin: thymeleaf/thymeleaf

structureHandler.removeAttribute(attributeName);
origin: thymeleaf/thymeleaf

  structureHandler.setAttribute(newAttributeName, newAttributeName);
} else {
  structureHandler.removeAttribute(newAttributeName);
    structureHandler.removeAttribute(newAttributeName);
origin: thymeleaf/thymeleaf

  structureHandler.removeAttribute(attributeName);
  return;
  structureHandler.removeAttribute(newAttributeName);
  structureHandler.removeAttribute(attributeName);
} else {
origin: thymeleaf/thymeleaf

structureHandler.removeAttribute(attributeName);
return;
origin: thymeleaf/thymeleaf

structureHandler.removeAttribute(attributeName);
origin: theborakompanioni/thymeleaf-extras-shiro

  @Override
  protected void doProcess(ITemplateContext iTemplateContext,
               IProcessableElementTag iProcessableElementTag,
               AttributeName attributeName,
               String attributeValue,
               IElementTagStructureHandler iElementTagStructureHandler) {
    if (ShiroFacade.isUser()) {
      iElementTagStructureHandler.removeAttribute(attributeName);
    } else {
      iElementTagStructureHandler.removeElement();
    }
  }
}
origin: com.github.theborakompanioni/thymeleaf-extras-shiro

  @Override
  protected void doProcess(ITemplateContext iTemplateContext,
               IProcessableElementTag iProcessableElementTag,
               AttributeName attributeName,
               String attributeValue,
               IElementTagStructureHandler iElementTagStructureHandler) {
    if (ShiroFacade.isUser()) {
      iElementTagStructureHandler.removeAttribute(attributeName);
    } else {
      iElementTagStructureHandler.removeElement();
    }
  }
}
origin: com.github.theborakompanioni/thymeleaf-extras-shiro

  @Override
  protected void doProcess(ITemplateContext iTemplateContext,
               IProcessableElementTag iProcessableElementTag,
               AttributeName attributeName,
               String attributeValue,
               IElementTagStructureHandler iElementTagStructureHandler) {
    if (ShiroFacade.isAuthenticated()) {
      iElementTagStructureHandler.removeAttribute(attributeName);
    } else {
      iElementTagStructureHandler.removeElement();
    }
  }
}
origin: com.github.theborakompanioni/thymeleaf-extras-shiro

  @Override
  protected void doProcess(ITemplateContext iTemplateContext,
               IProcessableElementTag iProcessableElementTag,
               AttributeName attributeName,
               String attributeValue,
               IElementTagStructureHandler iElementTagStructureHandler) {
    if (ShiroFacade.isNotAuthenticated()) {
      iElementTagStructureHandler.removeAttribute(attributeName);
    } else {
      iElementTagStructureHandler.removeElement();
    }
  }
}
origin: theborakompanioni/thymeleaf-extras-shiro

  @Override
  protected void doProcess(ITemplateContext iTemplateContext,
               IProcessableElementTag iProcessableElementTag,
               AttributeName attributeName,
               String attributeValue,
               IElementTagStructureHandler iElementTagStructureHandler) {
    if (ShiroFacade.isGuest()) {
      iElementTagStructureHandler.removeAttribute(attributeName);
    } else {
      iElementTagStructureHandler.removeElement();
    }
  }
}
origin: theborakompanioni/thymeleaf-extras-shiro

  @Override
  protected void doProcess(ITemplateContext iTemplateContext,
               IProcessableElementTag iProcessableElementTag,
               AttributeName attributeName,
               String attributeValue,
               IElementTagStructureHandler iElementTagStructureHandler) {
    if (ShiroFacade.isNotAuthenticated()) {
      iElementTagStructureHandler.removeAttribute(attributeName);
    } else {
      iElementTagStructureHandler.removeElement();
    }
  }
}
origin: theborakompanioni/thymeleaf-extras-shiro

  @Override
  protected void doProcess(ITemplateContext iTemplateContext,
               IProcessableElementTag iProcessableElementTag,
               AttributeName attributeName,
               String attributeValue,
               IElementTagStructureHandler iElementTagStructureHandler) {
    if (ShiroFacade.isAuthenticated()) {
      iElementTagStructureHandler.removeAttribute(attributeName);
    } else {
      iElementTagStructureHandler.removeElement();
    }
  }
}
origin: com.github.theborakompanioni/thymeleaf-extras-shiro

  @Override
  protected void doProcess(ITemplateContext iTemplateContext,
               IProcessableElementTag iProcessableElementTag,
               AttributeName attributeName,
               String attributeValue,
               IElementTagStructureHandler iElementTagStructureHandler) {
    if (ShiroFacade.isGuest()) {
      iElementTagStructureHandler.removeAttribute(attributeName);
    } else {
      iElementTagStructureHandler.removeElement();
    }
  }
}
origin: theborakompanioni/thymeleaf-extras-shiro

  @Override
  protected void doProcess(ITemplateContext iTemplateContext,
               IProcessableElementTag iProcessableElementTag,
               AttributeName attributeName,
               String attributeValue,
               IElementTagStructureHandler iElementTagStructureHandler) {
    final String rawValue = getRawValue(iProcessableElementTag, attributeName);
    final List<String> values = evaluateAsStringsWithDelimiter(iTemplateContext, rawValue, DELIMITER);

    if (ShiroFacade.hasAllRoles(values)) {
      iElementTagStructureHandler.removeAttribute(attributeName);
    } else {
      iElementTagStructureHandler.removeElement();
    }
  }
}
origin: theborakompanioni/thymeleaf-extras-shiro

  @Override
  protected void doProcess(ITemplateContext iTemplateContext,
               IProcessableElementTag iProcessableElementTag,
               AttributeName attributeName,
               String attributeValue,
               IElementTagStructureHandler iElementTagStructureHandler) {
    final String rawValue = getRawValue(iProcessableElementTag, attributeName);
    final List<String> values = evaluateAsStringsWithDelimiter(iTemplateContext, rawValue, DELIMITER);

    if (ShiroFacade.hasAnyRoles(values)) {
      iElementTagStructureHandler.removeAttribute(attributeName);
    } else {
      iElementTagStructureHandler.removeElement();
    }
  }
}
org.thymeleaf.processor.elementIElementTagStructureHandlerremoveAttribute

Javadoc

Instructs the engine to remove an attribute from the tag being processed.

Popular methods of IElementTagStructureHandler

  • setBody
  • removeElement
  • setAttribute
  • replaceWith
  • setLocalVariable
  • insertBefore
  • insertImmediatelyAfter
  • replaceAttribute
  • removeTags
  • iterateElement
    Instructs the engine to iterate the current element, applying a specific iteration configuration.
  • removeAllButFirstChild
    Instructs the engine to remove all the children of the element being processed, except the first on
  • removeBody
    Instructs the engine to remove the body of the element being processed, but keep the open and close
  • removeAllButFirstChild,
  • removeBody,
  • setInliner,
  • setSelectionTarget,
  • setTemplateData

Popular in Java

  • Reading from database using SQL prepared statement
  • setContentView (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getResourceAsStream (ClassLoader)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now