org.springframework.webflow.mvc.view
Class BindingModel
java.lang.Object
org.springframework.validation.AbstractErrors
org.springframework.webflow.mvc.view.BindingModel
- All Implemented Interfaces:
- Serializable, org.springframework.validation.BindingResult, org.springframework.validation.Errors
public class BindingModel
- extends org.springframework.validation.AbstractErrors
- implements org.springframework.validation.BindingResult
Makes the properties of the "model" object available to Spring views during rendering. Also makes data binding (aka
mapping) results available after a form postback attempt. Also makes error messages available to the view.
This class is a Spring Errors adapter, basically, for use with spring form and bind tags.
- Author:
- Keith Donald, Jeremy Grelle
- See Also:
AbstractMvcView
,
Serialized Form
Fields inherited from interface org.springframework.validation.BindingResult |
MODEL_KEY_PREFIX |
Fields inherited from interface org.springframework.validation.Errors |
NESTED_PATH_SEPARATOR |
Methods inherited from class org.springframework.validation.AbstractErrors |
getErrorCount, getFieldError, getFieldError, getFieldErrorCount, getFieldErrorCount, getGlobalError, getGlobalErrorCount, getNestedPath, hasErrors, hasFieldErrors, hasFieldErrors, hasGlobalErrors, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath, toString |
Methods inherited from interface org.springframework.validation.Errors |
getErrorCount, getFieldError, getFieldError, getFieldErrorCount, getFieldErrorCount, getGlobalError, getGlobalErrorCount, getNestedPath, hasErrors, hasFieldErrors, hasFieldErrors, hasGlobalErrors, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath |
BindingModel
public BindingModel(String objectName,
Object boundObject,
ExpressionParser expressionParser,
ConversionService conversionService,
MessageContext messageContext)
- Creates a new Spring Binding model.
- Parameters:
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 display
setMappingResults
public void setMappingResults(MappingResults results)
- Sets the results of a data mapping attempt onto the bound model object from the view.
- Parameters:
results
- - See Also:
AbstractMvcView.processUserEvent()
setBinderConfiguration
public void setBinderConfiguration(BinderConfiguration binderConfiguration)
getAllErrors
public List getAllErrors()
- Specified by:
getAllErrors
in interface org.springframework.validation.Errors
- Overrides:
getAllErrors
in class org.springframework.validation.AbstractErrors
getGlobalErrors
public List getGlobalErrors()
- Specified by:
getGlobalErrors
in interface org.springframework.validation.Errors
getFieldErrors
public List getFieldErrors(String field)
- Specified by:
getFieldErrors
in interface org.springframework.validation.Errors
- Overrides:
getFieldErrors
in class org.springframework.validation.AbstractErrors
getFieldType
public Class getFieldType(String field)
- Specified by:
getFieldType
in interface org.springframework.validation.Errors
- Overrides:
getFieldType
in class org.springframework.validation.AbstractErrors
getFieldValue
public Object getFieldValue(String field)
- Specified by:
getFieldValue
in interface org.springframework.validation.Errors
getFieldErrors
public List getFieldErrors()
- Specified by:
getFieldErrors
in interface org.springframework.validation.Errors
getObjectName
public String getObjectName()
- Specified by:
getObjectName
in interface org.springframework.validation.Errors
addAllErrors
public void addAllErrors(org.springframework.validation.Errors errors)
- Specified by:
addAllErrors
in interface org.springframework.validation.Errors
reject
public void reject(String errorCode,
Object[] errorArgs,
String defaultMessage)
- Specified by:
reject
in interface org.springframework.validation.Errors
rejectValue
public void rejectValue(String field,
String errorCode,
Object[] errorArgs,
String defaultMessage)
- Specified by:
rejectValue
in interface org.springframework.validation.Errors
getTarget
public Object getTarget()
- Specified by:
getTarget
in interface org.springframework.validation.BindingResult
getRawFieldValue
public Object getRawFieldValue(String field)
- Specified by:
getRawFieldValue
in interface org.springframework.validation.BindingResult
findEditor
public PropertyEditor findEditor(String field,
Class valueType)
- Specified by:
findEditor
in interface org.springframework.validation.BindingResult
addError
public void addError(org.springframework.validation.ObjectError error)
- Specified by:
addError
in interface org.springframework.validation.BindingResult
getModel
public Map getModel()
- Specified by:
getModel
in interface org.springframework.validation.BindingResult
getPropertyEditorRegistry
public org.springframework.beans.PropertyEditorRegistry getPropertyEditorRegistry()
- Specified by:
getPropertyEditorRegistry
in interface org.springframework.validation.BindingResult
getSuppressedFields
public String[] getSuppressedFields()
- Specified by:
getSuppressedFields
in interface org.springframework.validation.BindingResult
recordSuppressedField
public void recordSuppressedField(String field)
- Specified by:
recordSuppressedField
in interface org.springframework.validation.BindingResult
resolveMessageCodes
public String[] resolveMessageCodes(String errorCode,
String field)
- Specified by:
resolveMessageCodes
in interface org.springframework.validation.BindingResult