Class ecm.model.ValueFormatter


Extends ecm.model._ModelObject.
Represents the format that is applied to a property value prior to that value being displayed in the user interface.
Defined in: <ecm\model\ValueFormatter.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 
Fields borrowed from class ecm.model._ModelObject:
categorization, id, isRecurring, name, nameFilter, pane, status, type, userId

Method Summary

Method Attributes Method Name and Description
 
formatDate(date, options)
Formats a date.
 
formatPath(pathIn)
Formats a path by inserting unicode characters to allow the path to be displayed correctly in right-to-left languages.
 
formatTimestampHideTime(value, valueTimeZoneOffset)
 
formatValue(value, type, valueTimeZoneOffset, valueTimeZoneOffset, separator)
Formats a value.
 
Returns the decimal point used when displaying double or decimal values.
 
Returns the default format for the given data type.
 
Returns the locale to use for value formatting.
 
Returns the separator used when displaying multi-value values.
 
parseDate(dateString, options)
Parses a date string.
 
setLocale(locale)
Set the locale to use for formatting values.
Methods borrowed from class ecm.model._ModelObject:
destroy, onChange, own, refresh, toString

Constructor Detail

ecm.model.ValueFormatter()

Method Detail

formatDate(date, options)

Formats a date.
Parameters:
date
The date to format.
options
The options to use for formatting. See dojo.date.locale __FormatOptions for more information.
Since:
2.0.2

formatPath(pathIn)

Formats a path by inserting unicode characters to allow the path to be displayed correctly in right-to-left languages.
Parameters:
pathIn

formatTimestampHideTime(value, valueTimeZoneOffset)

Parameters:
value
valueTimeZoneOffset

formatValue(value, type, valueTimeZoneOffset, valueTimeZoneOffset, separator)

Formats a value.
Parameters:
value
The value to format. For multi-values this will be an array of values.
type
The type of the value, such as xs:string, xs:timestamp, etc. See ecm.model.AttributeDefinition for data type definitions.
valueTimeZoneOffset
The time zone offset of the value of type xt:timestamp.
valueTimeZoneOffset
separator

getDecimalPoint()

Returns the decimal point used when displaying double or decimal values.

getDefaultFormat(type)

Returns the default format for the given data type.
Parameters:
type
The data type, such as xs:string, xs:timestamp, etc. See ecm.model.AttributeDefinition for data type definitions.

getLocale()

Returns the locale to use for value formatting.
Since:
2.0.2

getSeparator()

Returns the separator used when displaying multi-value values.

parseDate(dateString, options)

Parses a date string. Returns a date.
Parameters:
dateString
The date string.
options
The options to use for parsing. See dojo.date.locale __FormatOptions for more information.
Since:
2.0.2

setLocale(locale)

Set the locale to use for formatting values.
Parameters:
locale
String locale value to use for the bundles.
Since:
2.0.2