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

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

Introduction

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

Prototype

KeyMethod IDENTITY

To view the source code for com.google.gwt.editor.client.impl DelegateMap IDENTITY.

Click 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. ja  va 2 s  .  co  m*/
    }

    return errors;
}