public class MapBindingResult extends AbstractBindingResult implements java.io.Serializable
Can be used as errors holder for custom binding onto a Map, for example when invoking a Validator for a Map object.
Map
,
Serialized FormMODEL_KEY_PREFIX
NESTED_PATH_SEPARATOR
Constructor and Description |
---|
MapBindingResult(java.util.Map<?,?> target,
java.lang.String objectName)
Create a new MapBindingResult instance.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
getActualFieldValue(java.lang.String field)
Extract the actual field value for the given field.
|
java.lang.Object |
getTarget()
Return the wrapped target object.
|
java.util.Map<?,?> |
getTargetMap() |
addAllErrors, addError, equals, findEditor, formatFieldValue, getAllErrors, getErrorCount, getFieldError, getFieldError, getFieldErrors, getFieldErrors, getFieldType, getFieldValue, getGlobalError, getGlobalErrors, getMessageCodesResolver, getModel, getObjectName, getPropertyEditorRegistry, getRawFieldValue, getSuppressedFields, hasErrors, hashCode, recordSuppressedField, reject, rejectValue, resolveMessageCodes, resolveMessageCodes, setMessageCodesResolver
canonicalFieldName, doSetNestedPath, fixedField, getFieldErrorCount, getFieldErrorCount, getGlobalErrorCount, getNestedPath, hasFieldErrors, hasFieldErrors, hasGlobalErrors, isMatchingFieldError, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getFieldErrorCount, getFieldErrorCount, getGlobalErrorCount, getNestedPath, hasFieldErrors, hasFieldErrors, hasGlobalErrors, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath
public MapBindingResult(java.util.Map<?,?> target, java.lang.String objectName)
target
- the target Map to bind ontoobjectName
- the name of the target objectpublic final java.util.Map<?,?> getTargetMap()
public final java.lang.Object getTarget()
AbstractBindingResult
getTarget
in interface BindingResult
getTarget
in class AbstractBindingResult
protected java.lang.Object getActualFieldValue(java.lang.String field)
AbstractBindingResult
getActualFieldValue
in class AbstractBindingResult
field
- the field to check