serialize map-values for table view

This commit is contained in:
Peter Hormanns 2012-09-21 18:56:07 +02:00
parent b3142cfbb9
commit 02d4a5ea8f

View File

@ -160,6 +160,22 @@ public class TableComponentFactory implements ComponentFactory, Serializable {
}
itemData[idx] = buf.toString();
}
if (valueObject != null && valueObject instanceof Map) {
StringBuffer buf = new StringBuffer();
Map valueMap = (Map) valueObject;
for (Object o : valueMap.keySet()) {
if (o instanceof String) {
if (buf.length() > 0) {
buf.append(',');
}
String key = (String) o;
buf.append(key);
buf.append('=');
buf.append(valueMap.get(key).toString());
}
}
itemData[idx] = buf.toString();
}
idx++;
}
}