@Override @Nullable public Object getRawFieldValue(String field) { return this.bindingResult.getRawFieldValue(field); }
@Override @Nullable public Object getRawFieldValue(String field) { return this.bindingResult.getRawFieldValue(field); }
@Override @Nullable public Object getRawFieldValue(String field) { return this.bindingResult.getRawFieldValue(field); }
@Override @Nullable public Object getRawFieldValue(String field) { return this.bindingResult.getRawFieldValue(field); }
/** * Extract the rejected value behind the given constraint violation, * for exposure through the Spring errors representation. * @param field the field that caused the binding error * @param violation the corresponding JSR-303 ConstraintViolation * @param bindingResult a Spring BindingResult for the backing object * which contains the current field's value * @return the invalid value to expose as part of the field error * @since 4.2 * @see javax.validation.ConstraintViolation#getInvalidValue() * @see org.springframework.validation.FieldError#getRejectedValue() */ @Nullable protected Object getRejectedValue(String field, ConstraintViolation<Object> violation, BindingResult bindingResult) { Object invalidValue = violation.getInvalidValue(); if (!"".equals(field) && !field.contains("[]") && (invalidValue == violation.getLeafBean() || field.contains("[") || field.contains("."))) { // Possibly a bean constraint with property path: retrieve the actual property value. // However, explicitly avoid this for "address[]" style paths that we can't handle. invalidValue = bindingResult.getRawFieldValue(field); } return invalidValue; }
/** * Extract the rejected value behind the given constraint violation, * for exposure through the Spring errors representation. * @param field the field that caused the binding error * @param violation the corresponding JSR-303 ConstraintViolation * @param bindingResult a Spring BindingResult for the backing object * which contains the current field's value * @return the invalid value to expose as part of the field error * @since 4.2 * @see javax.validation.ConstraintViolation#getInvalidValue() * @see org.springframework.validation.FieldError#getRejectedValue() */ @Nullable protected Object getRejectedValue(String field, ConstraintViolation<Object> violation, BindingResult bindingResult) { Object invalidValue = violation.getInvalidValue(); if (!"".equals(field) && !field.contains("[]") && (invalidValue == violation.getLeafBean() || field.contains("[") || field.contains("."))) { // Possibly a bean constraint with property path: retrieve the actual property value. // However, explicitly avoid this for "address[]" style paths that we can't handle. invalidValue = bindingResult.getRawFieldValue(field); } return invalidValue; }
if (this.errors instanceof BindingResult) { this.bindingResult = (BindingResult) this.errors; this.actualValue = this.bindingResult.getRawFieldValue(this.expression); this.editor = this.bindingResult.findEditor(this.expression, null);
if (this.errors instanceof BindingResult) { this.bindingResult = (BindingResult) this.errors; this.actualValue = this.bindingResult.getRawFieldValue(this.expression); this.editor = this.bindingResult.findEditor(this.expression, null);
if (this.errors instanceof BindingResult) { this.bindingResult = (BindingResult) this.errors; this.actualValue = this.bindingResult.getRawFieldValue(this.expression); this.editor = this.bindingResult.findEditor(this.expression, null);
@Override @Nullable public Object getRawFieldValue(String field) { return this.bindingResult.getRawFieldValue(field); }
@Override @Nullable public Object getRawFieldValue(String field) { return this.bindingResult.getRawFieldValue(field); }
@Override @Nullable public Object getRawFieldValue(String field) { return this.bindingResult.getRawFieldValue(field); }
/** * Extract the rejected value behind the given constraint violation, * for exposure through the Spring errors representation. * @param field the field that caused the binding error * @param violation the corresponding JSR-303 ConstraintViolation * @param bindingResult a Spring BindingResult for the backing object * which contains the current field's value * @return the invalid value to expose as part of the field error * @since 4.2 * @see javax.validation.ConstraintViolation#getInvalidValue() * @see org.springframework.validation.FieldError#getRejectedValue() */ @Nullable protected Object getRejectedValue(String field, ConstraintViolation<Object> violation, BindingResult bindingResult) { Object invalidValue = violation.getInvalidValue(); if (!"".equals(field) && !field.contains("[]") && (invalidValue == violation.getLeafBean() || field.contains("[") || field.contains("."))) { // Possibly a bean constraint with property path: retrieve the actual property value. // However, explicitly avoid this for "address[]" style paths that we can't handle. invalidValue = bindingResult.getRawFieldValue(field); } return invalidValue; }
if (this.errors instanceof BindingResult) { this.bindingResult = (BindingResult) this.errors; this.actualValue = this.bindingResult.getRawFieldValue(this.expression); this.editor = this.bindingResult.findEditor(this.expression, null);
if (this.errors instanceof BindingResult) { this.bindingResult = (BindingResult) this.errors; this.actualValue = this.bindingResult.getRawFieldValue(this.expression); this.editor = this.bindingResult.findEditor(this.expression, null);
if (this.errors instanceof BindingResult) { this.bindingResult = (BindingResult) this.errors; this.actualValue = this.bindingResult.getRawFieldValue(this.expression); this.editor = this.bindingResult.findEditor(this.expression, null);