List of usage examples for org.springframework.web.servlet.support BindStatus findEditor
@Nullable
public PropertyEditor findEditor(Class<?> valueClass)
From source file:org.hdiv.web.servlet.tags.form.SelectedValueComparatorHDIV.java
private static boolean exhaustiveCollectionCompare(Collection collection, Object candidateValue, BindStatus bindStatus) { Map<PropertyEditor, Object> convertedValueCache = new HashMap<PropertyEditor, Object>(1); PropertyEditor editor = null; boolean candidateIsString = (candidateValue instanceof String); if (!candidateIsString) { editor = bindStatus.findEditor(candidateValue.getClass()); }//from w w w .j ava 2s . co m for (Object element : collection) { if (editor == null && element != null && candidateIsString) { editor = bindStatus.findEditor(element.getClass()); } if (exhaustiveCompare(element, candidateValue, editor, convertedValueCache)) { return true; } } return false; }