selectlist = new ArrayList();
selectlist.add(prop.getValue());
}
for (Iterator it = list.iterator(); it.hasNext();) {
String value = it.next().toString();
<BUG>input radio = new input(getDisplayType().equals("radio") ? input.radio : input.checkbox, prefix + name, value);
</BUG>
if (selectlist.contains(value))
radio.setChecked(true);
<BUG>radio.addElement(getDisplayValue(value, map, context));
buffer.append(radio.toString());
if (it.hasNext()) {
buffer.append("<br/>");
</BUG>
}

selectlist = new ArrayList();
} else if ((prop instanceof ListProperty) || (prop instanceof DBStringListProperty)) {
selectlist = (List) prop.getValue();
} else {
selectlist = new ArrayList();
selectlist.add(prop.getValue());
}
for (Iterator it = list.iterator(); it.hasNext();) {
String value = it.next().toString();
input radio = new input((getDisplayType().equals("radio")&&isMultiSelect()) ? input.radio : input.checkbox, prefix + name, value);
if (selectlist.contains(value))
radio.setChecked(true);
radio.addElement(getDisplayValue(value, map, context));
buffer.append("<span class=\"xwiki-form-listclass\" id=\"xwiki-form-" + name + "\">");
