The Spring Framework

Class MapBindingResult

  extended by org.springframework.validation.AbstractBindingResult
      extended by org.springframework.validation.MapBindingResult
All Implemented Interfaces:
Serializable, BindingResult, Errors

public class MapBindingResult
extends AbstractBindingResult
implements Serializable

Map-based implementation of the BindingResult interface, supporting registration and evaluation of binding errors on Map attributes.

Can be used as errors holder for custom binding onto a Map, for example when invoking a Validator for a Map object.

Juergen Hoeller
See Also:
Map, Serialized Form

Field Summary
Fields inherited from interface org.springframework.validation.BindingResult
Fields inherited from interface org.springframework.validation.Errors
Constructor Summary
MapBindingResult(Map target, String objectName)
          Create a new MapBindingResult instance.
Method Summary
protected  Object getActualFieldValue(String field)
          Extract the actual field value for the given field.
 Object getTarget()
          Return the wrapped target object.
 Map getTargetMap()
Methods inherited from class org.springframework.validation.AbstractBindingResult
addAllErrors, addError, canonicalFieldName, doSetNestedPath, equals, fixedField, formatFieldValue, getAllErrors, getErrorCount, getFieldError, getFieldError, getFieldErrorCount, getFieldErrorCount, getFieldErrors, getFieldErrors, getFieldType, getFieldValue, getGlobalError, getGlobalErrorCount, getGlobalErrors, getMessageCodesResolver, getModel, getNestedPath, getObjectName, getPropertyEditorRegistry, getSuppressedFields, hasErrors, hasFieldErrors, hasFieldErrors, hasGlobalErrors, hashCode, isMatchingFieldError, popNestedPath, pushNestedPath, recordSuppressedField, reject, reject, reject, rejectValue, rejectValue, rejectValue, resolveMessageCodes, resolveMessageCodes, setMessageCodesResolver, setNestedPath, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail


public MapBindingResult(Map target,
                        String objectName)
Create a new MapBindingResult instance.

target - the target Map to bind onto
objectName - the name of the target object
Method Detail


public final Map getTargetMap()


public final Object getTarget()
Description copied from class: AbstractBindingResult
Return the wrapped target object.

Specified by:
getTarget in interface BindingResult
Specified by:
getTarget in class AbstractBindingResult


protected Object getActualFieldValue(String field)
Description copied from class: AbstractBindingResult
Extract the actual field value for the given field.

Specified by:
getActualFieldValue in class AbstractBindingResult
field - the field to check
the current value of the field

The Spring Framework

Copyright © 2002-2007 The Spring Framework.