new module:ct-element /formatter /Null Value Formatter()
Substitutes text when the value is null, undefined, or the empty string.
NullValueFormatter
is typically used in the XML Renderer Framework, but can be invoked programmatically
as in the following example which evaluates to "N/A":
NullValueFormatter.format("", {nullValue:"N/A"})
- Implements:
Methods
format(vValue, mAttributes) → {String}
Substitutes replacement text when the string is void (null, undefined, or the empty string).
Parameters:
Name | Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
vValue |
Variant | the string. |
||||||||||
mAttributes |
Map |
the map of attributes. Properties
|
- Implements:
Returns:
the replacement string in the case of a void, otherwise the unchanged string.
- Type
- String