Class DefaultViewElementAttributeConverter
java.lang.Object
com.foreach.across.modules.web.ui.DefaultViewElementAttributeConverter
- All Implemented Interfaces:
ViewElementAttributeConverter
,Function<Object,
String>
@Component
public class DefaultViewElementAttributeConverter
extends Object
implements ViewElementAttributeConverter
Default implementation of
ViewElementAttributeConverter
. If a raw value is a primitive or wrapper,
it will be converted to string using its Object.toString()
method. Otherwise it will be converted
to a JSON string using the ObjectMapper
.
If the raw value is a Supplier
, the value will be fetched from the supplier first, and then converted.- Since:
- 2.0.0
- Author:
- Arne Vandamme
-
Field Summary
Fields inherited from interface com.foreach.across.modules.web.ui.ViewElementAttributeConverter
OBJECT_MAPPER_BEAN
-
Constructor Summary
ConstructorDescriptionDefaultViewElementAttributeConverter
(com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary