Class DirectFieldBindingResult

All Implemented Interfaces:
Serializable, BindingResult, Errors

public class DirectFieldBindingResult extends AbstractPropertyBindingResult
Special implementation of the Errors and BindingResult interfaces, supporting registration and evaluation of binding errors on value objects. Performs direct field access instead of going through JavaBean getters.

Since Spring 4.1 this implementation is able to traverse nested fields.

Since:
2.0
Author:
Juergen Hoeller
See Also:
  • Constructor Details

    • DirectFieldBindingResult

      public DirectFieldBindingResult(@Nullable Object target, String objectName)
      Create a new DirectFieldBindingResult instance.
      Parameters:
      target - the target object to bind onto
      objectName - the name of the target object
    • DirectFieldBindingResult

      public DirectFieldBindingResult(@Nullable Object target, String objectName, boolean autoGrowNestedPaths)
      Create a new DirectFieldBindingResult instance.
      Parameters:
      target - the target object to bind onto
      objectName - the name of the target object
      autoGrowNestedPaths - whether to "auto-grow" a nested path that contains a null value
  • Method Details