public class BindingModel
extends org.springframework.validation.AbstractErrors
implements org.springframework.validation.BindingResult
AbstractMvcView
,
Serialized FormConstructor and Description |
---|
BindingModel(java.lang.String objectName,
java.lang.Object boundObject,
ExpressionParser expressionParser,
ConversionService conversionService,
MessageContext messageContext)
Creates a new Spring Binding model.
|
Modifier and Type | Method and Description |
---|---|
void |
addAllErrors(org.springframework.validation.Errors errors) |
void |
addError(org.springframework.validation.ObjectError error) |
java.beans.PropertyEditor |
findEditor(java.lang.String field,
java.lang.Class<?> valueType) |
java.util.List<org.springframework.validation.ObjectError> |
getAllErrors() |
java.util.List<org.springframework.validation.FieldError> |
getFieldErrors() |
java.util.List<org.springframework.validation.FieldError> |
getFieldErrors(java.lang.String field) |
java.lang.Class<?> |
getFieldType(java.lang.String field) |
java.lang.Object |
getFieldValue(java.lang.String field) |
java.util.List<org.springframework.validation.ObjectError> |
getGlobalErrors() |
java.util.Map<java.lang.String,java.lang.Object> |
getModel() |
java.lang.String |
getObjectName() |
org.springframework.beans.PropertyEditorRegistry |
getPropertyEditorRegistry() |
java.lang.Object |
getRawFieldValue(java.lang.String field) |
java.lang.String[] |
getSuppressedFields() |
java.lang.Object |
getTarget() |
void |
recordSuppressedField(java.lang.String field) |
void |
reject(java.lang.String errorCode,
java.lang.Object[] errorArgs,
java.lang.String defaultMessage) |
void |
rejectValue(java.lang.String field,
java.lang.String errorCode,
java.lang.Object[] errorArgs,
java.lang.String defaultMessage) |
java.lang.String[] |
resolveMessageCodes(java.lang.String errorCode) |
java.lang.String[] |
resolveMessageCodes(java.lang.String errorCode,
java.lang.String field) |
void |
setBinderConfiguration(BinderConfiguration binderConfiguration) |
void |
setMappingResults(MappingResults results)
Sets the results of a data mapping attempt onto the bound model object from the view.
|
canonicalFieldName, doSetNestedPath, fixedField, getErrorCount, getFieldError, getFieldError, getFieldErrorCount, getFieldErrorCount, getGlobalError, getGlobalErrorCount, getNestedPath, hasErrors, hasFieldErrors, hasFieldErrors, hasGlobalErrors, isMatchingFieldError, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getErrorCount, getFieldError, getFieldError, getFieldErrorCount, getFieldErrorCount, getGlobalError, getGlobalErrorCount, getNestedPath, hasErrors, hasFieldErrors, hasFieldErrors, hasGlobalErrors, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath
public BindingModel(java.lang.String objectName, java.lang.Object boundObject, ExpressionParser expressionParser, ConversionService conversionService, MessageContext messageContext)
objectName
- the name of the bound model objectboundObject
- the bound model objectexpressionParser
- the expression parser used to access model object propertiesconversionService
- the registry used to access converters for formatting propertiesmessageContext
- the message context containing flow messages to displaypublic void setMappingResults(MappingResults results)
results
- AbstractMvcView.processUserEvent()
public void setBinderConfiguration(BinderConfiguration binderConfiguration)
public java.util.List<org.springframework.validation.ObjectError> getAllErrors()
getAllErrors
in interface org.springframework.validation.Errors
getAllErrors
in class org.springframework.validation.AbstractErrors
public java.util.List<org.springframework.validation.ObjectError> getGlobalErrors()
getGlobalErrors
in interface org.springframework.validation.Errors
public java.util.List<org.springframework.validation.FieldError> getFieldErrors(java.lang.String field)
getFieldErrors
in interface org.springframework.validation.Errors
getFieldErrors
in class org.springframework.validation.AbstractErrors
public java.lang.Class<?> getFieldType(java.lang.String field)
getFieldType
in interface org.springframework.validation.Errors
getFieldType
in class org.springframework.validation.AbstractErrors
public java.lang.Object getFieldValue(java.lang.String field)
getFieldValue
in interface org.springframework.validation.Errors
public java.util.List<org.springframework.validation.FieldError> getFieldErrors()
getFieldErrors
in interface org.springframework.validation.Errors
public java.lang.String getObjectName()
getObjectName
in interface org.springframework.validation.Errors
public void addAllErrors(org.springframework.validation.Errors errors)
addAllErrors
in interface org.springframework.validation.Errors
public void reject(java.lang.String errorCode, java.lang.Object[] errorArgs, java.lang.String defaultMessage)
reject
in interface org.springframework.validation.Errors
public void rejectValue(java.lang.String field, java.lang.String errorCode, java.lang.Object[] errorArgs, java.lang.String defaultMessage)
rejectValue
in interface org.springframework.validation.Errors
public java.lang.Object getTarget()
getTarget
in interface org.springframework.validation.BindingResult
public java.lang.Object getRawFieldValue(java.lang.String field)
getRawFieldValue
in interface org.springframework.validation.BindingResult
public java.beans.PropertyEditor findEditor(java.lang.String field, java.lang.Class<?> valueType)
findEditor
in interface org.springframework.validation.BindingResult
public void addError(org.springframework.validation.ObjectError error)
addError
in interface org.springframework.validation.BindingResult
public java.util.Map<java.lang.String,java.lang.Object> getModel()
getModel
in interface org.springframework.validation.BindingResult
public org.springframework.beans.PropertyEditorRegistry getPropertyEditorRegistry()
getPropertyEditorRegistry
in interface org.springframework.validation.BindingResult
public java.lang.String[] getSuppressedFields()
getSuppressedFields
in interface org.springframework.validation.BindingResult
public void recordSuppressedField(java.lang.String field)
recordSuppressedField
in interface org.springframework.validation.BindingResult
public java.lang.String[] resolveMessageCodes(java.lang.String errorCode, java.lang.String field)
resolveMessageCodes
in interface org.springframework.validation.BindingResult
public java.lang.String[] resolveMessageCodes(java.lang.String errorCode)
resolveMessageCodes
in interface org.springframework.validation.BindingResult