Example usage for org.springframework.beans PropertyBatchUpdateException getPropertyAccessExceptions

List of usage examples for org.springframework.beans PropertyBatchUpdateException getPropertyAccessExceptions

Introduction

In this page you can find the example usage for org.springframework.beans PropertyBatchUpdateException getPropertyAccessExceptions.

Prototype

public final PropertyAccessException[] getPropertyAccessExceptions() 

Source Link

Document

Return an array of the propertyAccessExceptions stored in this object.

Usage

From source file:org.springframework.validation.DataBinder.java

/**
 * Apply given property values to the target object.
 * <p>Default implementation applies all of the supplied property
 * values as bean property values. By default, unknown fields will
 * be ignored.//from w  w w  .j  av a  2s.  c  o  m
 * @param mpvs the property values to be bound (can be modified)
 * @see #getTarget
 * @see #getPropertyAccessor
 * @see #isIgnoreUnknownFields
 * @see #getBindingErrorProcessor
 * @see BindingErrorProcessor#processPropertyAccessException
 */
protected void applyPropertyValues(MutablePropertyValues mpvs) {
    try {
        // Bind request parameters onto target object.
        getPropertyAccessor().setPropertyValues(mpvs, isIgnoreUnknownFields(), isIgnoreInvalidFields());
    } catch (PropertyBatchUpdateException ex) {
        // Use bind error processor to create FieldErrors.
        for (PropertyAccessException pae : ex.getPropertyAccessExceptions()) {
            getBindingErrorProcessor().processPropertyAccessException(pae, getInternalBindingResult());
        }
    }
}