Class NullHandlingConverterWrapper<PRESENTATION,​MODEL>

  • All Implemented Interfaces:
    com.vaadin.flow.data.converter.Converter<PRESENTATION,​MODEL>, Serializable

    public class NullHandlingConverterWrapper<PRESENTATION,​MODEL>
    extends Object
    implements com.vaadin.flow.data.converter.Converter<PRESENTATION,​MODEL>
    Wraps a converter and returns an error if the wrapped converter would return null as the model value.
    See Also:
    Serialized Form
    • Constructor Detail

      • NullHandlingConverterWrapper

        public NullHandlingConverterWrapper​(com.vaadin.flow.data.converter.Converter<PRESENTATION,​MODEL> converter)
    • Method Detail

      • convertToModel

        public com.vaadin.flow.data.binder.Result<MODEL> convertToModel​(PRESENTATION value,
                                                                        com.vaadin.flow.data.binder.ValueContext context)
        Specified by:
        convertToModel in interface com.vaadin.flow.data.converter.Converter<PRESENTATION,​MODEL>
      • convertToPresentation

        public PRESENTATION convertToPresentation​(MODEL value,
                                                  com.vaadin.flow.data.binder.ValueContext context)
        Specified by:
        convertToPresentation in interface com.vaadin.flow.data.converter.Converter<PRESENTATION,​MODEL>