ComponentEditConfig editConfig = component.getEditConfig();
Map<String, DropTarget> dropTargets = (editConfig != null) ? editConfig.getDropTargets() : null;
if (dropTargets != null && !dropTargets.isEmpty()) {
DropTarget dropTarget = null;
// Find the named Drop Target
for (final Map.Entry<String, DropTarget> entry : dropTargets.entrySet()) {
dropTarget = entry.getValue();
if (StringUtils.equals(name, dropTarget.getName())) {
break;
} else {
dropTarget = null;
}
}
if (dropTarget != null) {
// If editType has not been specified then intelligently determine the best match
editType = (editType == null) ? getWCMEditType(dropTarget) : editType;
String classNames = dropTarget.getId() + " " + editType.getCssClass();
String placeholderTitle = "Drop Target: " + dropTarget.getName();
html.append(generateClassicUIPlaceholder(classNames, placeholderTitle));
}
}