/** * Write the field value by invoking the setter function on the given * bean, if the value passes all registered validators. * * @param bean * the bean to set the property value to */ private BindingValidationStatus<TARGET> writeFieldValue(BEAN bean) { assert bean != null; Result<TARGET> result = doConversion(); if (!isReadOnly()) { result.ifOk(value -> setter.accept(bean, value)); } return toValidationStatus(result); }
/** * Returns the field value run through all converters and validators, * but doesn't pass the {@link BindingValidationStatus} to any status * handler. * * @return the validation status */ private BindingValidationStatus<TARGET> doValidation() { return toValidationStatus(doConversion()); }