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

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

Introduction

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

Prototype

public List<Editor<?>> getEditorByPath(String path) 

Source Link

Document

Returns a list of Editors available at a particular absolute path.

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()));
        }//from  w  ww  .j a  v  a 2 s  .c  o m
    }

    return errors;
}