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
  • Constructor Details

    • DefaultViewElementAttributeConverter

      public DefaultViewElementAttributeConverter(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
  • Method Details