diff --git a/src/main/java/org/gcube/portlets/user/tdwx/client/config/TabularDataGridViewConfig.java b/src/main/java/org/gcube/portlets/user/tdwx/client/config/TabularDataGridViewConfig.java index e237acc..d9858ac 100644 --- a/src/main/java/org/gcube/portlets/user/tdwx/client/config/TabularDataGridViewConfig.java +++ b/src/main/java/org/gcube/portlets/user/tdwx/client/config/TabularDataGridViewConfig.java @@ -38,12 +38,13 @@ public class TabularDataGridViewConfig implements GridViewConfig { Map keys = new HashMap(); for (ColumnDefinition column : definition.getColumnsAsList()) { - keys.put(column.getLabel(), column.getKey()); + keys.put(column.getColumnLocalId(), column.getKey()); if (column.getType() == ColumnType.VALIDATION){ validationColumns.add(column); } } row = new Row(keys); + } /** diff --git a/src/main/java/org/gcube/portlets/user/tdwx/client/model/util/ColumnConfigGenerator.java b/src/main/java/org/gcube/portlets/user/tdwx/client/model/util/ColumnConfigGenerator.java index 7f46733..f41e088 100644 --- a/src/main/java/org/gcube/portlets/user/tdwx/client/model/util/ColumnConfigGenerator.java +++ b/src/main/java/org/gcube/portlets/user/tdwx/client/model/util/ColumnConfigGenerator.java @@ -51,7 +51,7 @@ public class ColumnConfigGenerator { //int rowIndex = context.getIndex(); //store.get(rowIndex); - String style = "style='color: " + (value ? "green" : "red") + String style = "style='color: " + (value ? "green" : "black") + "'"; String v = String.valueOf(value); sb.appendHtmlConstant(" validationColumns) { String style = ""; - for (ColumnDefinition c : validationColumns) { - Boolean valid = row.getField(c.getColumnLocalId()); - if (valid != null && valid == false) { + String valid = row.getFieldAsText(c.getColumnLocalId()); + Boolean b=new Boolean(valid); + if (!b) { style = res.tdGridCSS().getGridRowRed(); break; } @@ -47,8 +52,9 @@ public class DefaultRowStyle implements RowStyleProvider { int colIndex) { String style = ""; for (ColumnDefinition c : validationColumns) { - Boolean valid = row.getField(c.getColumnLocalId()); - if (valid != null && valid == false) { + String valid = row.getFieldAsText(c.getColumnLocalId()); + Boolean b=new Boolean(valid); + if (!b) { style = res.tdGridCSS().getGridRowRed(); break; } diff --git a/src/main/resources/org/gcube/portlets/user/tdwx/client/resources/TDGrid.css b/src/main/resources/org/gcube/portlets/user/tdwx/client/resources/TDGrid.css index 4311a4e..febd9d4 100644 --- a/src/main/resources/org/gcube/portlets/user/tdwx/client/resources/TDGrid.css +++ b/src/main/resources/org/gcube/portlets/user/tdwx/client/resources/TDGrid.css @@ -1,6 +1,6 @@ @CHARSET "UTF-8"; .grid-row-red { - background-color: #FFAFAF !important; + background-color: #FF3333 !important; }