org.apache.struts2.views.java
Class Attributes
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<java.lang.String,java.lang.String>
org.apache.struts2.views.java.Attributes
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.String>
public class Attributes
- extends java.util.LinkedHashMap<java.lang.String,java.lang.String>
Map of tag attributes, used for rendering the tags
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from class java.util.AbstractMap |
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
|
Method Summary |
Attributes |
add(java.lang.String key,
java.lang.String value)
|
Attributes |
add(java.lang.String key,
java.lang.String value,
boolean encode)
|
Attributes |
addDefaultToEmpty(java.lang.String attrName,
java.lang.Object paramValue)
Add a key/value pair to the attributes, if the value is null, it will be set as an empty string. |
Attributes |
addDefaultToEmpty(java.lang.String attrName,
java.lang.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. |
Attributes |
addIfExists(java.lang.String attrName,
java.lang.Object paramValue)
Add a key/value pair to the attributes only if the value is not null. |
Attributes |
addIfExists(java.lang.String attrName,
java.lang.Object paramValue,
boolean encode)
Add a key/value pair to the attributes only if the value is not null. |
Attributes |
addIfTrue(java.lang.String attrName,
java.lang.Object paramValue)
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.LinkedHashMap |
clear, containsValue, get, removeEldestEntry |
| Methods inherited from class java.util.HashMap |
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Attributes
public Attributes()
add
public Attributes add(java.lang.String key,
java.lang.String value)
add
public Attributes add(java.lang.String key,
java.lang.String value,
boolean encode)
addIfExists
public Attributes addIfExists(java.lang.String attrName,
java.lang.Object paramValue)
- Add a key/value pair to the attributes only if the value is not null. Value
is html encoded
- Parameters:
attrName - attribute nameparamValue - value of attribute
- Returns:
- this
addIfExists
public Attributes addIfExists(java.lang.String attrName,
java.lang.Object paramValue,
boolean encode)
- Add a key/value pair to the attributes only if the value is not null.
- Parameters:
attrName - attribute nameparamValue - value of attributeencode - html encode the value
- Returns:
- this
addIfTrue
public Attributes addIfTrue(java.lang.String attrName,
java.lang.Object paramValue)
- Add 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 nameparamValue - value of attribute
- Returns:
- this
addDefaultToEmpty
public Attributes addDefaultToEmpty(java.lang.String attrName,
java.lang.Object paramValue)
- Add 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 nameparamValue - value of attribute
- Returns:
- this
addDefaultToEmpty
public Attributes addDefaultToEmpty(java.lang.String attrName,
java.lang.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.
- Parameters:
attrName - attribute nameparamValue - value of attributeencode - html encode the value
- Returns:
- this
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.