diff --git a/src/main/java/org/gcube/portlets/user/tdwx/client/TabularDataXGridPanel.java b/src/main/java/org/gcube/portlets/user/tdwx/client/TabularDataXGridPanel.java index f8a9992..72e6ddc 100644 --- a/src/main/java/org/gcube/portlets/user/tdwx/client/TabularDataXGridPanel.java +++ b/src/main/java/org/gcube/portlets/user/tdwx/client/TabularDataXGridPanel.java @@ -59,11 +59,8 @@ import com.sencha.gxt.widget.core.client.event.HeaderContextMenuEvent.HeaderCont import com.sencha.gxt.widget.core.client.grid.ColumnConfig; import com.sencha.gxt.widget.core.client.grid.ColumnModel; import com.sencha.gxt.widget.core.client.grid.Grid; -import com.sencha.gxt.widget.core.client.grid.Grid.GridCell; import com.sencha.gxt.widget.core.client.grid.LiveGridView; import com.sencha.gxt.widget.core.client.grid.LiveToolItem; -import com.sencha.gxt.widget.core.client.grid.editing.ClicksToEdit; -import com.sencha.gxt.widget.core.client.grid.editing.GridInlineEditing; import com.sencha.gxt.widget.core.client.menu.Item; import com.sencha.gxt.widget.core.client.menu.Menu; import com.sencha.gxt.widget.core.client.menu.MenuItem; 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 31d4167..824c219 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 @@ -11,6 +11,8 @@ import org.gcube.portlets.user.tdwx.shared.model.ColumnType; import org.gcube.portlets.user.tdwx.shared.model.DataRow; import com.google.gwt.cell.client.AbstractCell; +import com.google.gwt.safecss.shared.SafeStyles; +import com.google.gwt.safecss.shared.SafeStylesBuilder; import com.google.gwt.safehtml.shared.SafeHtmlBuilder; import com.sencha.gxt.widget.core.client.form.CheckBox; import com.sencha.gxt.widget.core.client.form.DateField; @@ -18,9 +20,7 @@ import com.sencha.gxt.widget.core.client.form.NumberField; import com.sencha.gxt.widget.core.client.form.NumberPropertyEditor; import com.sencha.gxt.widget.core.client.form.TextField; import com.sencha.gxt.widget.core.client.grid.ColumnConfig; -import com.sencha.gxt.widget.core.client.grid.editing.AbstractGridEditing; import com.sencha.gxt.widget.core.client.grid.editing.GridInlineEditing; -import com.sencha.gxt.widget.core.client.grid.editing.GridRowEditing; /** * @@ -91,8 +91,14 @@ public class ColumnConfigGenerator { return null; } + if (columnDefinition.getType() == ColumnType.VIEWCOLUMN) { + SafeStyles safeStyle=columnConfig.getColumnStyle(); + SafeStylesBuilder ssb=new SafeStylesBuilder(); + ssb.append(safeStyle); + ssb.trustedBackgroundColor("#c3e1fc"); + columnConfig.setColumnStyle(ssb.toSafeStyles()); + } - columnConfig.setHidden(!columnDefinition.isVisible()); SafeHtmlBuilder tooltipMessage = new SafeHtmlBuilder(); tooltipMessage diff --git a/src/main/java/org/gcube/portlets/user/tdwx/shared/model/ColumnType.java b/src/main/java/org/gcube/portlets/user/tdwx/shared/model/ColumnType.java index 6c17f01..870bb84 100644 --- a/src/main/java/org/gcube/portlets/user/tdwx/shared/model/ColumnType.java +++ b/src/main/java/org/gcube/portlets/user/tdwx/shared/model/ColumnType.java @@ -16,5 +16,6 @@ public enum ColumnType { COLUMNID, DIMENSION, TIMEDIMENSION, + VIEWCOLUMN, SYSTEM; }