abstract class ValueFormatter
extends java.lang.Object
Plain formatting simply prevents the string 'null
' from appearing,
replacing it with an empty String, and adds HTML escaping as required.
<code>PropertyEditor</code>-aware formatting will attempt to use the supplied <code>PropertyEditor</code> to render any non-String value before applying the default rules of plain formatting.
Constructor and Description |
---|
ValueFormatter() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getDisplayString(java.lang.Object value,
boolean htmlEscape)
Build the display value of the supplied
Object , HTML escaped
as required. |
static java.lang.String |
getDisplayString(java.lang.Object value,
java.beans.PropertyEditor propertyEditor,
boolean htmlEscape)
Build the display value of the supplied
Object , HTML escaped
as required. |
public static java.lang.String getDisplayString(java.lang.Object value, boolean htmlEscape)
Object
, HTML escaped
as required. This version is not <code>PropertyEditor</code>-aware.public static java.lang.String getDisplayString(java.lang.Object value, java.beans.PropertyEditor propertyEditor, boolean htmlEscape)
Object
, HTML escaped
as required. If the supplied value is not a <code>String</code> and the supplied
<code>PropertyEditor</code> is not null then the <code>PropertyEditor</code> is used
to obtain the display value.getDisplayString(Object, boolean)