Class HtmlElementHelper
java.lang.Object
de.hybris.platform.acceleratorservices.util.HtmlElementHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmergeAttributeMaps(Map<String, String>... maps) Performs a merge of given attribute maps.protected StringmergeAttributeValue(String key, String currentValue, String newValue) Performs a merge of current and new value.Processes a given attribute map and merges it with global result map.voidwriteEndElement(javax.servlet.jsp.PageContext pageContext, String elementName) voidwriteOpenElement(javax.servlet.jsp.PageContext pageContext, String elementName, Map<String, String> attributes)
-
Constructor Details
-
HtmlElementHelper
public HtmlElementHelper()
-
-
Method Details
-
writeOpenElement
-
writeEndElement
-
mergeAttributeMaps
Performs a merge of given attribute maps.- Parameters:
maps- maps to merge- Returns:
- merged attribute map from given maps
-
mergeSingleAttributeMap
protected Map<String,String> mergeSingleAttributeMap(Map<String, String> map, Map<String, String> result) Processes a given attribute map and merges it with global result map. For entry key "class" it concatenates values with a space character as a separator (example: "class", "css1 css2"). For keys other than "class" a new value (if not null) replaces an old value. For null values it removes the entry for given key from the map.- Parameters:
map- currently processes mapresult- result map- Returns:
- result map
-
mergeAttributeValue
Performs a merge of current and new value. For key="class" concatenates both values with a space character as a separator.- Parameters:
key- keycurrentValue- current value in mapnewValue- new value to put- Returns:
- new value to put in map
-