本文整理了Java中com.vaadin.ui.Field.getValidators()
方法的一些代码示例,展示了Field.getValidators()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Field.getValidators()
方法的具体详情如下:
包路径:com.vaadin.ui.Field
类名称:Field
方法名:getValidators
暂无
代码示例来源:origin: korpling/ANNIS
@Override
public Collection<Validator> getValidators()
{
return field.getValidators();
}
代码示例来源:origin: org.vaadin.addons/customfield
public Collection<Validator> getValidators() {
if (property instanceof Validatable) {
return ((Validatable) property).getValidators();
} else {
return wrappedField.getValidators();
}
}
代码示例来源:origin: com.holon-platform.vaadin7/holon-vaadin
/**
* Create a {@link ValidatableInput} component type from given {@link Field} instance.
* @param <T> Value type
* @param field The field instance (not null)
* @param inheritValidators Whether to inherit {@link Field} validators, if any
* @return A new {@link ValidatableInput} component which wraps the given <code>field</code>
*/
static <T> ValidatableInput<T> from(Field<T> field, boolean inheritValidators) {
final ValidatableInput<T> input = from(Input.from(field));
if (inheritValidators) {
Collection<com.vaadin.data.Validator> fieldValidators = field.getValidators();
if (fieldValidators != null) {
fieldValidators.forEach(v -> input.addValidator(ValidationUtils.asValidator(v)));
}
}
return input;
}
内容来源于网络,如有侵权,请联系作者删除!