public FieldValidator createDefaultValidator(Field field, String overrideId, Messages overrideMessages,
Locale locale, Class propertyType, AnnotationProvider propertyAnnotations)
{
environment.push(EnvironmentMessages.class, new EnvironmentMessages(overrideMessages, overrideId));
FieldValidator fieldValidator = defaultSource.createDefaultValidator(field, overrideId,
overrideMessages, locale, propertyType, propertyAnnotations);
environment.pop(EnvironmentMessages.class);
return fieldValidator;
}
public FieldValidator createDefaultValidator(ComponentResources resources, String parameterName)
{
EnvironmentMessages em = new EnvironmentMessages(resources.getContainerMessages(), resources.getId());
environment.push(EnvironmentMessages.class, em);
FieldValidator fieldValidator = defaultSource.createDefaultValidator(resources, parameterName);
environment.pop(EnvironmentMessages.class);
return fieldValidator;
}
};
}