List of usage examples for com.vaadin.ui AbstractField getErrorMessage
public ErrorMessage getErrorMessage()
From source file:info.magnolia.ui.form.field.AbstractCustomMultiField.java
License:Open Source License
/** * Get the error message./*from www . j a va2 s .com*/ */ @Override public ErrorMessage getErrorMessage() { ErrorMessage errorMessage = null; List<AbstractField<T>> fields = getFields(this, false); for (AbstractField<T> field : fields) { errorMessage = field.getErrorMessage(); if (errorMessage != null) { return errorMessage; } } return errorMessage; }
From source file:org.vaadin.viritin.MBeanFieldGroup.java
License:Apache License
/** * This method hides validation errors on a required fields until the field * has been changed for the first time. Does pretty much the same as old * Vaadin Form did with its validationVisibleOnCommit, but eagerly per * field./*from w w w . ja v a 2 s .c o m*/ * <p> * Fields that hide validation errors this way are available in * getFieldsWithIntiallyDisabledValidation() so they can be emphasized in * UI. */ public void hideInitialEmpyFieldValidationErrors() { fieldsWithInitiallyDisabledValidation.clear(); for (Field f : getFields()) { if (f instanceof AbstractField) { final AbstractField abstractField = (AbstractField) f; if (abstractField.getErrorMessage() != null && abstractField.isRequired() && abstractField.isEmpty() && abstractField.isValidationVisible()) { final String propertyId = getPropertyId(abstractField).toString(); abstractField.setValidationVisible(false); fieldsWithInitiallyDisabledValidation.add(propertyId); } } } }