Package org.apache.struts2.views.java
Class Attributes
- All Implemented Interfaces:
- Serializable,- Cloneable,- Map<String,- String> 
Map of tag attributes, used for rendering the tags
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.util.AbstractMapAbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionaddDefaultToEmpty(String attrName, Object paramValue) Add a key/value pair to the attributes, if the value is null, it will be set as an empty string.addDefaultToEmpty(String attrName, Object paramValue, boolean encode) Add a key/value pair to the attributes, if the value is null, it will be set as an empty string.addIfExists(String attrName, Object paramValue) Add a key/value pair to the attributes only if the value is not null.addIfExists(String attrName, Object paramValue, boolean encode) Add a key/value pair to the attributes only if the value is not null.Add a key/value pair to the attributes only if the value is not null and is a boolean with a value of 'true'.Methods inherited from class java.util.LinkedHashMapclear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesMethods inherited from class java.util.HashMapclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMapequals, hashCode, toStringMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
- 
Constructor Details- 
Attributespublic Attributes()
 
- 
- 
Method Details- 
add
- 
add
- 
addIfExistsAdd a key/value pair to the attributes only if the value is not null. Value is html encoded- Parameters:
- attrName- attribute name
- paramValue- value of attribute
- Returns:
- this
 
- 
addIfExistsAdd a key/value pair to the attributes only if the value is not null.- Parameters:
- attrName- attribute name
- paramValue- value of attribute
- encode- html encode the value
- Returns:
- this
 
- 
addIfTrueAdd a key/value pair to the attributes only if the value is not null and is a boolean with a value of 'true'. Value is html encoded- Parameters:
- attrName- attribute name
- paramValue- value of attribute
- Returns:
- this
 
- 
addDefaultToEmptyAdd a key/value pair to the attributes, if the value is null, it will be set as an empty string. Value is html encoded.- Parameters:
- attrName- attribute name
- paramValue- value of attribute
- Returns:
- this
 
- 
addDefaultToEmptyAdd a key/value pair to the attributes, if the value is null, it will be set as an empty string.- Parameters:
- attrName- attribute name
- paramValue- value of attribute
- encode- html encode the value
- Returns:
- this
 
 
-