Example usage for com.google.gwt.editor.client.impl DelegateMap of

List of usage examples for com.google.gwt.editor.client.impl DelegateMap of

Introduction

In this page you can find the example usage for com.google.gwt.editor.client.impl DelegateMap of.

Prototype

public static DelegateMap of(EditorDriver<?> driver, KeyMethod key) 

Source Link

Usage

From source file:com.gafactory.core.client.ui.editors.BaseEditorView.java

License:Open Source License

private List<EditorError> getEditorErrors(Set<ConstraintViolation<T>> violations,
        SimpleBeanEditorDriver<T, ?> driver) {
    DelegateMap delegateMap = DelegateMap.of(driver, DelegateMap.IDENTITY);

    ArrayList<EditorError> errors = new ArrayList<EditorError>(violations.size());

    for (ConstraintViolation<T> violation : violations) {
        final List<Editor<?>> editorsByPath = delegateMap
                .getEditorByPath(violation.getPropertyPath().toString());

        for (Editor<?> editor : editorsByPath) {
            errors.add(new DefaultEditorError(editor, violation.getMessage(), violation.getInvalidValue()));
        }//www .  j  a va2  s  . co m
    }

    return errors;
}