}
private void copyFieldContent(final RequestContext context, final ObjectAdapter object, final InputField[] formFields, final boolean showIcon) {
for (final InputField inputField : formFields) {
final String fieldName = inputField.getName();
final ObjectAssociation field = object.getSpecification().getAssociation(fieldName);
if (field.isVisible(IsisContext.getAuthenticationSession(), object, where).isAllowed()) {
IsisContext.getPersistenceSession().resolveField(object, field);
final ObjectAdapter fieldValue = field.get(object);
if (inputField.isEditable()) {
final String value = getValue(context, fieldValue);
if (!value.equals("") || inputField.getValue() == null) {
inputField.setValue(value);
}
} else {
final String entry = getValue(context, fieldValue);
inputField.setHtml(entry);
inputField.setType(InputField.HTML);
}
if (field.getSpecification().getFacet(ParseableFacet.class) == null) {
if (fieldValue != null) {
final String iconSegment = showIcon ? "<img class=\"small-icon\" src=\"" + context.imagePath(field.getSpecification()) + "\" alt=\"" + field.getSpecification().getShortIdentifier() + "\"/>" : "";
final String entry = iconSegment + fieldValue.titleString();
inputField.setHtml(entry);
} else {
final String entry = "<em>none specified</em>";
inputField.setHtml(entry);