From 02d4a5ea8f4303e9e2008ca75042ce3c7b7fb530 Mon Sep 17 00:00:00 2001
From: Peter Hormanns <peter.hormanns@jalin.de>
Date: Fri, 21 Sep 2012 18:56:07 +0200
Subject: [PATCH] serialize map-values for table view

---
 hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java b/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java
index 107a07e..59cd903 100644
--- a/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java
+++ b/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java
@@ -160,6 +160,22 @@
 									}
 									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++;
 							}
 						}

--
Gitblit v1.9.0-SNAPSHOT