BindStatus bindStatus = getBindStatus();
PropertyEditor editor = null;
if (resolvedValue != null && bindStatus.getErrors() instanceof BindingResult) {
PropertyEditorRegistry editorRegistry = ((BindingResult) bindStatus.getErrors()).getPropertyEditorRegistry();
if (editorRegistry != null) {
editor = editorRegistry.findCustomEditor(resolvedValue.getClass(), bindStatus.getPath());
}
}
tagWriter.writeAttribute("value", getDisplayString(resolvedValue, editor));
if (SelectedValueComparator.isSelected(bindStatus, resolvedValue)) {
tagWriter.writeAttribute("checked", "checked");