public final class LayoutUtilities
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
HTML_ELEMENT_BODY |
static java.lang.String |
HTML_ELEMENT_HEAD |
static java.lang.String |
HTML_ELEMENT_HTML |
static java.lang.String |
HTML_ELEMENT_TITLE |
static java.lang.String |
LINE_SEPARATOR |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
equalsAttributeName(org.thymeleaf.dom.Attribute attribute,
java.lang.String prefix,
java.lang.String name)
Returns whether the attribute contains the given prefix and name parts.
|
static java.lang.String |
getAttributeValue(org.thymeleaf.dom.Element element,
java.lang.String prefix,
java.lang.String name)
Returns the value of the attribute.
|
static boolean |
hasAttribute(org.thymeleaf.dom.Element element,
java.lang.String prefix,
java.lang.String name)
Returns whether or not the attribute on the element exists.
|
static void |
pullAttributes(org.thymeleaf.dom.Element targetelement,
org.thymeleaf.dom.Element sourceelement)
Replace the attributes of the target element with those of the source
element.
|
static void |
pullAttributes(org.thymeleaf.dom.Element targetelement,
org.thymeleaf.dom.Element sourceelement,
boolean mergeonly)
The same as
pullAttributes(Element, Element), but with the
option to specify whether to copy everything over, or only attributes
that already exist in sourceelement. |
static void |
pullContent(org.thymeleaf.dom.Element targetelement,
org.thymeleaf.dom.Element sourceelement)
Replace the content of the target element, with the content of the source
element.
|
static void |
removeAttribute(org.thymeleaf.dom.Element element,
java.lang.String prefix,
java.lang.String name)
Removes an attribute from an element.
|
public static final java.lang.String LINE_SEPARATOR
public static final java.lang.String HTML_ELEMENT_HTML
public static final java.lang.String HTML_ELEMENT_HEAD
public static final java.lang.String HTML_ELEMENT_TITLE
public static final java.lang.String HTML_ELEMENT_BODY
public static boolean equalsAttributeName(org.thymeleaf.dom.Attribute attribute,
java.lang.String prefix,
java.lang.String name)
attribute - prefix - name - public static java.lang.String getAttributeValue(org.thymeleaf.dom.Element element,
java.lang.String prefix,
java.lang.String name)
element - prefix - name - public static boolean hasAttribute(org.thymeleaf.dom.Element element,
java.lang.String prefix,
java.lang.String name)
element - prefix - name - public static void pullAttributes(org.thymeleaf.dom.Element targetelement,
org.thymeleaf.dom.Element sourceelement)
targetelement - sourceelement - public static void pullAttributes(org.thymeleaf.dom.Element targetelement,
org.thymeleaf.dom.Element sourceelement,
boolean mergeonly)
pullAttributes(Element, Element), but with the
option to specify whether to copy everything over, or only attributes
that already exist in sourceelement.targetelement - sourceelement - mergeonly - true to pull only attributes that exist in
targetelement. th:with values
will continue to be brought in regardless.public static void pullContent(org.thymeleaf.dom.Element targetelement,
org.thymeleaf.dom.Element sourceelement)
targetelement - sourceelement - public static void removeAttribute(org.thymeleaf.dom.Element element,
java.lang.String prefix,
java.lang.String name)
element - prefix - name -