/** * Determine the display value of the supplied {@code Object}, * HTML-escaped as required. */ private String getDisplayString(@Nullable Object value) { PropertyEditor editor = (value != null ? this.bindStatus.findEditor(value.getClass()) : null); return ValueFormatter.getDisplayString(value, editor, this.htmlEscape); }
private static boolean exhaustiveCollectionCompare( Collection<?> collection, Object candidateValue, BindStatus bindStatus) { Map<PropertyEditor, Object> convertedValueCache = new HashMap<>(); PropertyEditor editor = null; boolean candidateIsString = (candidateValue instanceof String); if (!candidateIsString) { editor = bindStatus.findEditor(candidateValue.getClass()); } 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; }
/** * Get a display String for the given value, converted by a PropertyEditor * that the BindStatus may have registered for the value's Class. */ protected String convertToDisplayString(@Nullable Object value) throws JspException { PropertyEditor editor = (value != null ? getBindStatus().findEditor(value.getClass()) : null); return getDisplayString(value, editor); }
/** * Determine the display value of the supplied {@code Object}, * HTML-escaped as required. */ private String getDisplayString(@Nullable Object value) { PropertyEditor editor = (value != null ? this.bindStatus.findEditor(value.getClass()) : null); return ValueFormatter.getDisplayString(value, editor, this.htmlEscape); }
private static boolean exhaustiveCollectionCompare( Collection<?> collection, Object candidateValue, BindStatus bindStatus) { Map<PropertyEditor, Object> convertedValueCache = new HashMap<>(); PropertyEditor editor = null; boolean candidateIsString = (candidateValue instanceof String); if (!candidateIsString) { editor = bindStatus.findEditor(candidateValue.getClass()); } 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; }
/** * Get a display String for the given value, converted by a PropertyEditor * that the BindStatus may have registered for the value's Class. */ protected String convertToDisplayString(@Nullable Object value) throws JspException { PropertyEditor editor = (value != null ? getBindStatus().findEditor(value.getClass()) : null); return getDisplayString(value, editor); }
@Override public PropertyEditor findEditor(final Class<?> valueClass) { return this.bindStatus.findEditor(valueClass); }
/** * Determine the display value of the supplied {@code Object}, * HTML-escaped as required. */ private String getDisplayString(Object value) { PropertyEditor editor = (value != null ? this.bindStatus.findEditor(value.getClass()) : null); return ValueFormatter.getDisplayString(value, editor, this.htmlEscape); }
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()); } 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; }
/** * Get a display String for the given value, converted by a PropertyEditor * that the BindStatus may have registered for the value's Class. */ protected String convertToDisplayString(Object value) throws JspException { PropertyEditor editor = (value != null ? getBindStatus().findEditor(value.getClass()) : null); return getDisplayString(value, editor); }