From a4c8b4d7199b24b62790a483c5cb9861bf8278b3 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Mon, 9 Feb 2015 15:22:25 +0000 Subject: [PATCH] Minor Update git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@111809 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/ChangeColumnTypePanel.java | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/ChangeColumnTypePanel.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/ChangeColumnTypePanel.java index 4d03d44..79a0c52 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/ChangeColumnTypePanel.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/ChangeColumnTypePanel.java @@ -846,14 +846,18 @@ public class ChangeColumnTypePanel extends FramedPanel implements } protected void updateAttributeType(ColumnDataType type) { - ArrayList valueDataFormats = valueDataFormatMap - .get(type); - comboValueDataFormat.clear(); - comboValueDataFormat.reset(); - comboValueDataFormat.getStore().clear(); - comboValueDataFormat.getStore().addAll(valueDataFormats); - comboValueDataFormat.redraw(); - + if (type.compareTo(ColumnDataType.Text) == 0) { + comboValueDataFormatLabel.setVisible(false); + } else { + comboValueDataFormatLabel.setVisible(true); + ArrayList valueDataFormats = valueDataFormatMap + .get(type); + comboValueDataFormat.clear(); + comboValueDataFormat.reset(); + comboValueDataFormat.getStore().clear(); + comboValueDataFormat.getStore().addAll(valueDataFormats); + comboValueDataFormat.redraw(); + } } protected void updateLocaleType(LocaleTypeElement type) { @@ -861,6 +865,7 @@ public class ChangeColumnTypePanel extends FramedPanel implements } protected void updatePeriodType(PeriodDataType periodDataType) { + ArrayList valueDataFormats = periodDataType .getTimeDataFormats(); comboValueDataFormat.clear(); @@ -1191,7 +1196,8 @@ public class ChangeColumnTypePanel extends FramedPanel implements ValueDataFormat valueDataFormat = comboValueDataFormat .getCurrentValue(); if (valueDataFormat != null) { - changeColumnTypeSession.setValueDataFormat(valueDataFormat); + changeColumnTypeSession + .setValueDataFormat(valueDataFormat); callChangeColumnType(); } else { UtilsGXT3.alert("Attention", @@ -1221,7 +1227,8 @@ public class ChangeColumnTypePanel extends FramedPanel implements ValueDataFormat valueDataFormat = comboValueDataFormat .getCurrentValue(); if (valueDataFormat != null) { - changeColumnTypeSession.setValueDataFormat(valueDataFormat); + changeColumnTypeSession + .setValueDataFormat(valueDataFormat); callChangeColumnType(); } else { UtilsGXT3.alert("Attention",