DisplayHelper¶
-
public final class
DisplayHelper¶ This helper class is responsible for the parsing of relationship and combobox values to display-friendly formats.
Fields¶
DTF¶
-
public static final DateTimeFormatter
DTF¶
Methods¶
getDisplayValueForField¶
-
public static Object
getDisplayValueForField(FieldDto field, Object value)¶ Parses provided relationship or combobox value to display-friendly format. The type of the value is determined by the
fieldparameter. Depending on the type of the field, a different representation will be returned.Parameters: - field – field definition, that contains the type of the field
- value – the value to be parsed
Returns: depending on the field type, it returns
Stringrepresentation for one-to-one relationshipMaprepresentation for the one-to-many and many-to-many relationshipsStringorCollectionrepresentation for comboboxes, depending on their settings
getDisplayValueForField¶
-
public static Object
getDisplayValueForField(FieldDto field, Object value, Integer maxLength)¶ Parses provided relationship or combobox value to display-friendly format. The type of the value is determined by the
fieldparameter. Depending on the type of the field, a different representation will be returned. Moreover, it limits the length of the parsed values, in case they exceed the provided limit.Parameters: - field – field definition, that contains the type of the field
- value – the value to be parsed
- maxLength – the number of characters, after which the values will be trimmed; for map representation this is a maximum number of characters for each value in the map
Returns: depending on the field type, it returns
Stringrepresentation for one-to-one relationshipMaprepresentation for the one-to-many and many-to-many relationshipsStringorCollectionrepresentation for comboboxes, depending on their settings