Class FieldValidatorDefaultSourceImpl
java.lang.Object
org.apache.tapestry5.internal.services.FieldValidatorDefaultSourceImpl
- All Implemented Interfaces:
FieldValidatorDefaultSource
-
Constructor Summary
ConstructorsConstructorDescriptionFieldValidatorDefaultSourceImpl
(ValidationConstraintGenerator validationConstraintGenerator, FieldValidatorSource fieldValidatorSource) -
Method Summary
Modifier and TypeMethodDescriptioncreateDefaultValidator
(ComponentResources resources, String parameterName) A convenience for the full version; assumes that the resources are associated with aField
.createDefaultValidator
(Field field, String overrideId, Messages overrideMessages, Locale locale, Class propertyType, AnnotationProvider propertyAnnotations) Analyzes the property type and property annotations to determine the default set of validations for the property, which are wrapped to form aFieldValidator
for a field.
-
Constructor Details
-
FieldValidatorDefaultSourceImpl
public FieldValidatorDefaultSourceImpl(ValidationConstraintGenerator validationConstraintGenerator, FieldValidatorSource fieldValidatorSource)
-
-
Method Details
-
createDefaultValidator
public FieldValidator createDefaultValidator(Field field, String overrideId, Messages overrideMessages, Locale locale, Class propertyType, AnnotationProvider propertyAnnotations) Description copied from interface:FieldValidatorDefaultSource
Analyzes the property type and property annotations to determine the default set of validations for the property, which are wrapped to form aFieldValidator
for a field.- Specified by:
createDefaultValidator
in interfaceFieldValidatorDefaultSource
- Parameters:
field
- Field component for which a validator is being createdoverrideId
- the id of the component, used to locate related messages for labels and errorsoverrideMessages
- where to search for label and error messageslocale
- locale used for locating messagespropertyType
- type of property bound to the editting parameter of the field (typically, the parameter named "value").propertyAnnotations
- source of annotations for the property being editted- Returns:
- a validator reflecting all default validations for the field
-
createDefaultValidator
Description copied from interface:FieldValidatorDefaultSource
A convenience for the full version; assumes that the resources are associated with aField
.- Specified by:
createDefaultValidator
in interfaceFieldValidatorDefaultSource
- Returns:
- a validator reflecting all default validations for the field
-