diff --git a/CHANGELOG.md b/CHANGELOG.md
index c9c742b..d84e65e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [v3.2.2-SNAPSHOT] - 2024-01-11
+
+- Improved display of results on multiple fields (in the table) [#26372]
+
## [v3.2.1] - 2023-06-16
- Fixed issue in the Search facility [#25265]
diff --git a/pom.xml b/pom.xml
index 702b870..b429949 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,7 +14,7 @@
org.gcube.portlets.user
geoportal-data-entry-app
war
- 3.2.1
+ 3.2.2-SNAPSHOT
GeoPortal Data Entry App
The GeoPortal Data Entry App is an application to build the web forms for data entries needed to create projects/documents (based on UCD) in the D4Science Geoportal service
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/GeonaRecordsPaginatedView.java b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/GeonaRecordsPaginatedView.java
index af1f8ab..8c69f93 100644
--- a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/GeonaRecordsPaginatedView.java
+++ b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/GeonaRecordsPaginatedView.java
@@ -188,6 +188,16 @@ public class GeonaRecordsPaginatedView {
}
// initFirstRangeChanged = false;
+ //printData((List) result.getData());
+ }
+
+ private void printData(List data) {
+ GWT.log("printData");
+ int i = 0;
+ for (DocumentDV documentDV : data) {
+ GWT.log(++i + ") json: " + documentDV.getDocumentAsJSON());
+ }
+
}
/**
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/table/ItemsTable.java b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/table/ItemsTable.java
index 0317876..fe6dc50 100644
--- a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/table/ItemsTable.java
+++ b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/table/ItemsTable.java
@@ -27,6 +27,7 @@ import com.google.gwt.core.shared.GWT;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.i18n.client.DateTimeFormat;
+import com.google.gwt.safehtml.client.SafeHtmlTemplates;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.google.gwt.safehtml.shared.SafeHtmlUtils;
@@ -102,6 +103,127 @@ public class ItemsTable extends AbstractItemsCellTable
super.addItems(items);
}
+ class CellRender {
+
+ String tooltip;
+ String value;
+
+ public CellRender() {
+ }
+
+ public String getTooltip() {
+ return tooltip;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setTooltip(String tooltip) {
+ this.tooltip = tooltip;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ }
+
+ public CellRender toCellRender(ItemFieldDV itemField, DocumentDV documentDV) {
+
+ StringBuilder tooltipBuilder = new StringBuilder();
+ StringBuilder valueBuilder = new StringBuilder();
+ String newLine = "
";
+ String newLineTxt = "\n";
+ String bullet = "• "; // it is the dot. As rendered in the tag
+
+ String newBullet = newLine + bullet;
+
+ List listJsonFields = itemField.getJsonFields();
+
+ int numberOfFields = listJsonFields.size();
+
+ if (numberOfFields > 1) {
+ valueBuilder.append(bullet);
+ }
+
+ for (String jsonKey : listJsonFields) {
+
+ try {
+ String objectToRender = "";
+ // removing the '_theDocument.' prefix for searching in the Document Map
+ String key = jsonKey.replace(ConstantsGeoPortalDataEntryApp.DEFAULT_DOCUMENT_PROJECTION_NAME + ".", "");
+ Object value = documentDV.getDocumentAsMap().get(key);
+ // GWT.log("key: "+key+" is instance of: "+value.getClass());
+
+ if (value == null)
+ continue;
+
+ GWT.log("value instance: " + value.getClass());
+
+ if (value instanceof ArrayList) {
+ ArrayList