Object key = error.getKey(); List<AbstractEditorDelegate<?, ?>> delegateList = delegateMap.get(key); if (delegateList != null) { + error.getPath(); final String originalAbsolutePath = absolutePath; while (true) { if (processLeafDelegates( delegateMap, originalAbsolutePath, absolutePath, error)) { break; } else if (processEditors( delegateMap, baseDelegate, absolutePath, error)) { break; "No editor: " + originalAbsolutePath); absolutePath = getParentPath(absolutePath);
/** * Records an error in any editors that match the path, returning true * if any editors matched. */ private static boolean processEditors(DelegateMap delegateMap, AbstractEditorDelegate<?, ?> baseDelegate, String absolutePath, SimpleViolation error) { List<Editor<?>> editors = delegateMap.getEditorByPath(absolutePath); if (editors == null) { return false; } // No EditorDelegate to attach it to, so record on the baseDelegate // with the appropriate editor & path. for (Editor<?> editor : editors) { baseDelegate.recordError(error.getMessage(), null, error.getUserDataObject(), error.getPath(), editor); } return true; }
public boolean setConstraintViolations(final Iterable<ConstraintViolation<?>> violations) { return doSetViolations(violations == null ? null : SimpleViolation .iterableFromConstrantViolations(violations)); }
delegate.recordError(error.getMessage(), null, error.getUserDataObject()); } else { delegate.recordError(error.getMessage(), null, error.getUserDataObject(), addlPath, delegate.getEditor());
protected boolean doSetViolations(Iterable<SimpleViolation> violations) { checkObject(); SimpleViolation.pushViolations(violations, asEditorDriver(), getViolationKeyMethod()); // Collect the errors, which will take care of co-editor chains. errors = new ArrayList<EditorError>(); accept(new ErrorCollector(errors)); return hasErrors(); }
delegate.recordError(error.getMessage(), null, error.getUserDataObject()); } else { delegate.recordError(error.getMessage(), null, error.getUserDataObject(), addlPath, delegate.getEditor());
protected boolean doSetViolations(Iterable<SimpleViolation> violations) { checkObject(); SimpleViolation.pushViolations(violations, asEditorDriver(), getViolationKeyMethod()); // Collect the errors, which will take care of co-editor chains. errors = new ArrayList<EditorError>(); accept(new ErrorCollector(errors)); return hasErrors(); }
Object key = error.getKey(); List<AbstractEditorDelegate<?, ?>> delegateList = delegateMap.get(key); if (delegateList != null) { + error.getPath(); final String originalAbsolutePath = absolutePath; while (true) { if (processLeafDelegates( delegateMap, originalAbsolutePath, absolutePath, error)) { break; } else if (processEditors( delegateMap, baseDelegate, absolutePath, error)) { break; "No editor: " + originalAbsolutePath); absolutePath = getParentPath(absolutePath);
/** * Records an error in any editors that match the path, returning true * if any editors matched. */ private static boolean processEditors(DelegateMap delegateMap, AbstractEditorDelegate<?, ?> baseDelegate, String absolutePath, SimpleViolation error) { List<Editor<?>> editors = delegateMap.getEditorByPath(absolutePath); if (editors == null) { return false; } // No EditorDelegate to attach it to, so record on the baseDelegate // with the appropriate editor & path. for (Editor<?> editor : editors) { baseDelegate.recordError(error.getMessage(), null, error.getUserDataObject(), error.getPath(), editor); } return true; }
delegate.recordError(error.getMessage(), null, error.getUserDataObject()); } else { delegate.recordError(error.getMessage(), null, error.getUserDataObject(), addlPath, delegate.getEditor());
public boolean setConstraintViolations(final Iterable<ConstraintViolation<?>> violations) { return doSetViolations(violations == null ? null : SimpleViolation .iterableFromConstrantViolations(violations)); }
protected boolean doSetViolations(Iterable<SimpleViolation> violations) { checkObject(); SimpleViolation.pushViolations(violations, asEditorDriver(), getViolationKeyMethod()); // Collect the errors, which will take care of co-editor chains. errors = new ArrayList<EditorError>(); accept(new ErrorCollector(errors)); return hasErrors(); }
Object key = error.getKey(); List<AbstractEditorDelegate<?, ?>> delegateList = delegateMap.get(key); if (delegateList != null) { + error.getPath(); final String originalAbsolutePath = absolutePath; while (true) { if (processLeafDelegates( delegateMap, originalAbsolutePath, absolutePath, error)) { break; } else if (processEditors( delegateMap, baseDelegate, absolutePath, error)) { break; "No editor: " + originalAbsolutePath); absolutePath = getParentPath(absolutePath);
/** * Records an error in any editors that match the path, returning true * if any editors matched. */ private static boolean processEditors(DelegateMap delegateMap, AbstractEditorDelegate<?, ?> baseDelegate, String absolutePath, SimpleViolation error) { List<Editor<?>> editors = delegateMap.getEditorByPath(absolutePath); if (editors == null) { return false; } // No EditorDelegate to attach it to, so record on the baseDelegate // with the appropriate editor & path. for (Editor<?> editor : editors) { baseDelegate.recordError(error.getMessage(), null, error.getUserDataObject(), error.getPath(), editor); } return true; }
public boolean setConstraintViolations(final Iterable<ConstraintViolation<?>> violations) { return doSetViolations(violations == null ? null : SimpleViolation .iterableFromConstrantViolations(violations)); }