Example usage for com.vaadin.server CompositeErrorMessage CompositeErrorMessage

List of usage examples for com.vaadin.server CompositeErrorMessage CompositeErrorMessage

Introduction

In this page you can find the example usage for com.vaadin.server CompositeErrorMessage CompositeErrorMessage.

Prototype

public CompositeErrorMessage(Collection<? extends ErrorMessage> errorMessages) 

Source Link

Document

Constructor for CompositeErrorMessage.

Usage

From source file:org.vaadin.viritin.fields.MPasswordField.java

License:Apache License

@Override
public ErrorMessage getErrorMessage() {

    Validator.InvalidValueException validationError = getValidationError();

    final ErrorMessage superError = getComponentError();

    if (superError == null && validationError == null && getCurrentBufferedSourceException() == null) {
        return null;
    }//from   w ww  . ja v  a  2 s.  c o  m
    // Throw combination of the error types
    return new CompositeErrorMessage(
            new ErrorMessage[] { superError, AbstractErrorMessage.getErrorMessageForException(validationError),
                    AbstractErrorMessage.getErrorMessageForException(getCurrentBufferedSourceException()) });
}