类 AbstractPropertyBindingResult
java.lang.Object
cn.taketoday.validation.AbstractErrors
cn.taketoday.validation.AbstractBindingResult
cn.taketoday.validation.AbstractPropertyBindingResult
- 所有已实现的接口:
BindingResult,Errors,Serializable
Abstract base class for
BindingResult implementations that work with
Framework's PropertyAccessor mechanism.
Pre-implements field access through delegation to the corresponding
PropertyAccessor methods.- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller
- 另请参阅:
-
字段概要
从接口继承的字段 cn.taketoday.validation.BindingResult
MODEL_KEY_PREFIX从接口继承的字段 cn.taketoday.validation.Errors
NESTED_PATH_SEPARATOR -
构造器概要
构造器限定符构造器说明protectedAbstractPropertyBindingResult(String objectName) Create a new AbstractPropertyBindingResult instance. -
方法概要
修饰符和类型方法说明protected StringcanonicalFieldName(String field) Returns the canonical property name.findEditor(String field, Class<?> valueType) This implementation exposes a PropertyEditor adapter for a Formatter, if applicable.protected ObjectformatFieldValue(String field, Object value) Formats the field value based on registered PropertyEditors.protected ObjectgetActualFieldValue(String field) Fetches the field value from the PropertyAccessor.protected PropertyEditorgetCustomEditor(String fixedField) Retrieve the custom PropertyEditor for the given field, if any.Class<?>getFieldType(String field) Determines the field type from the property type.abstract ConfigurablePropertyAccessorProvide the PropertyAccessor to work with, according to the concrete strategy of access.Returns the underlying PropertyAccessor.voidinitConversion(cn.taketoday.core.conversion.ConversionService conversionService) 从类继承的方法 cn.taketoday.validation.AbstractBindingResult
addAllErrors, addError, equals, getAllErrors, getErrorCount, getFieldError, getFieldError, getFieldErrors, getFieldErrors, getFieldValue, getGlobalError, getGlobalErrors, getMessageCodesResolver, getModel, getObjectName, getRawFieldValue, getSuppressedFields, getTarget, hasErrors, hashCode, recordFieldValue, recordSuppressedField, reject, rejectValue, resolveMessageCodes, resolveMessageCodes, setMessageCodesResolver从类继承的方法 cn.taketoday.validation.AbstractErrors
doSetNestedPath, fixedField, getFieldErrorCount, getFieldErrorCount, getGlobalErrorCount, getNestedPath, hasFieldErrors, hasFieldErrors, hasGlobalErrors, isMatchingFieldError, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath, toString从接口继承的方法 cn.taketoday.validation.Errors
getFieldErrorCount, getFieldErrorCount, getGlobalErrorCount, getNestedPath, hasFieldErrors, hasFieldErrors, hasGlobalErrors, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath
-
构造器详细资料
-
AbstractPropertyBindingResult
Create a new AbstractPropertyBindingResult instance.- 参数:
objectName- the name of the target object- 另请参阅:
-
-
方法详细资料
-
initConversion
public void initConversion(cn.taketoday.core.conversion.ConversionService conversionService) -
getPropertyEditorRegistry
Returns the underlying PropertyAccessor.- 指定者:
getPropertyEditorRegistry在接口中BindingResult- 覆盖:
getPropertyEditorRegistry在类中AbstractBindingResult- 返回:
- the PropertyEditorRegistry, or
nullif none available for this BindingResult - 另请参阅:
-
canonicalFieldName
Returns the canonical property name.- 覆盖:
canonicalFieldName在类中AbstractErrors- 参数:
field- the original field name- 返回:
- the canonical field name
- 另请参阅:
-
getFieldType
Determines the field type from the property type.- 指定者:
getFieldType在接口中Errors- 覆盖:
getFieldType在类中AbstractBindingResult- 参数:
field- the field name- 返回:
- the type of the field, or
nullif not determinable - 另请参阅:
-
getActualFieldValue
Fetches the field value from the PropertyAccessor.- 指定者:
getActualFieldValue在类中AbstractBindingResult- 参数:
field- the field to check- 返回:
- the current value of the field
- 另请参阅:
-
formatFieldValue
Formats the field value based on registered PropertyEditors.- 覆盖:
formatFieldValue在类中AbstractBindingResult- 参数:
field- the field to checkvalue- the value of the field (either a rejected value other than from a binding error, or an actual field value)- 返回:
- the formatted value
- 另请参阅:
-
getCustomEditor
Retrieve the custom PropertyEditor for the given field, if any.- 参数:
fixedField- the fully qualified field name- 返回:
- the custom PropertyEditor, or
null
-
findEditor
This implementation exposes a PropertyEditor adapter for a Formatter, if applicable.- 指定者:
findEditor在接口中BindingResult- 覆盖:
findEditor在类中AbstractBindingResult- 参数:
field- the path of the property (name or nested path), ornullif looking for an editor for all properties of the given typevalueType- the type of the property (can benullif a property is given but should be specified in any case for consistency checking)- 返回:
- the registered editor, or
nullif none
-
getPropertyAccessor
Provide the PropertyAccessor to work with, according to the concrete strategy of access.Note that a PropertyAccessor used by a BindingResult should always have its "extractOldValueForEditor" flag set to "true" by default, since this is typically possible without side effects for model objects that serve as data binding target.
-