From 9dadb209c172822237ab5da1a3dfcd9ab5bc387b Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Wed, 9 Apr 2014 09:14:18 +0000 Subject: [PATCH] Updated change column type git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@94605 82a268e6-3cf1-43bd-a215-b396298e98cf --- .gwt/.gwt-log | 32 +++++++++++++++++++ .../client/ChangeColumnTypePanel.java | 16 +++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/.gwt/.gwt-log b/.gwt/.gwt-log index c5eab35..643c2ff 100644 --- a/.gwt/.gwt-log +++ b/.gwt/.gwt-log @@ -2504,3 +2504,35 @@ Compiling... Compilation completed in 0.00 seconds Removing invalidated units Finding entry point classes +Public resources found in... +Translatable source found in... +Found 0 cached/archived units. Used 0 / 2719 units from cache. +Compiling... + 50% complete (ETR: 5 seconds) + 50% complete (ETR: 5 seconds) + 50% complete (ETR: 5 seconds) + 50% complete (ETR: 5 seconds) + 50% complete (ETR: 5 seconds) + 50% complete (ETR: 5 seconds) + 60% complete (ETR: 4 seconds) + 70% complete (ETR: 3 seconds) + 80% complete (ETR: 2 seconds) + 90% complete (ETR: 1 seconds) + 100% complete (ETR: 0 seconds) + Compilation completed in 14.56 seconds +Removing invalidated units +Finding entry point classes +Public resources found in... +Translatable source found in... +Found 2719 cached/archived units. Used 2719 / 2719 units from cache. +Compiling... + Compilation completed in 0.00 seconds +Removing invalidated units +Finding entry point classes +Public resources found in... +Translatable source found in... +Found 2719 cached/archived units. Used 2719 / 2719 units from cache. +Compiling... + Compilation completed in 0.00 seconds +Removing invalidated units +Finding entry point classes 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 f92321d..188c6fa 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 @@ -681,6 +681,9 @@ public class ChangeColumnTypePanel extends FramedPanel implements comboAttributeType.setValue(ColumnDataTypeStore .selectedAttributeElement(cd.getDataTypeName())); } else { + if (type == ColumnTypeCode.CODENAME) { + setLocale(cd.getLocale()); + } else { // TODO Add TimeDimension and Dimension information to // ColumnData /* @@ -692,7 +695,7 @@ public class ChangeColumnTypePanel extends FramedPanel implements * * } */ - + } } } @@ -928,5 +931,16 @@ public class ChangeColumnTypePanel extends FramedPanel implements }); } + + + protected void setLocale(String locale){ + for(LocaleTypeElement loc:storeComboLocaleType.getAll()){ + if(loc.getLocaleName().compareTo(locale)==0){ + comboLocaleType.setValue(loc); + break; + } + } + } + }