diff --git a/distro/README b/distro/README index 9e76865..ff06f62 100644 --- a/distro/README +++ b/distro/README @@ -39,7 +39,7 @@ Documentation tabular-data-column-widget allows to perform operations on the columns of a tabular resource Documentation is available on-line from the Projects Documentation Wiki: - https://gcube.wiki.gcube-system.org/gcube/index.php/Tabular_Data_Manager + http://wiki.gcube-system.org/gcube/Tabular_Data_Manager Licensing diff --git a/pom.xml b/pom.xml index 6225d7f..8b92f76 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ ${project.basedir}/distro ${project.build.directory}/${project.build.finalName} 2015-10-15 - https://gcube.wiki.gcube-system.org/gcube/index.php/Tabular_Data_Manager + http://wiki.gcube-system.org/gcube/Tabular_Data_Manager templates distro config diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/ChangeColumnTypeDialog.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/ChangeColumnTypeDialog.java index d3d1076..081452d 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/ChangeColumnTypeDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/ChangeColumnTypeDialog.java @@ -31,7 +31,7 @@ public class ChangeColumnTypeDialog extends Window { } protected void create(TRId trId, String columnName, EventBus eventBus) { - msgs = GWT.create(ChangeColumnTypeMessages.class); + initMessages(); initWindow(); ChangeColumnTypePanel changeColumnTypePanel = new ChangeColumnTypePanel( trId, columnName, eventBus); @@ -39,6 +39,10 @@ public class ChangeColumnTypeDialog extends Window { } + protected void initMessages(){ + msgs = GWT.create(ChangeColumnTypeMessages.class); + } + protected void initWindow() { setWidth(WIDTH); setHeight(HEIGHT); 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 7ea1dbe..5b90970 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 @@ -32,6 +32,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.column.mapping.ColumnMapp import org.gcube.portlets.user.td.gwtservice.shared.tr.column.type.ChangeColumnTypeSession; import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog; import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialogListener; +import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages; import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType; @@ -150,9 +151,9 @@ public class ChangeColumnTypePanel extends FramedPanel implements private ChangeColumnTypeSession changeColumnTypeSession; private boolean panelCreated; private ChangeColumnTypeMessages msgs; - + private CommonMessages msgsCommon; + public ChangeColumnTypePanel(TRId trId, String columnName, EventBus eventBus) { - msgs = GWT.create(ChangeColumnTypeMessages.class); setWidth(WIDTH); setHeight(HEIGHT); setHeaderVisible(false); @@ -161,9 +162,15 @@ public class ChangeColumnTypePanel extends FramedPanel implements this.columnName = columnName; this.eventBus = eventBus; panelCreated = false; + initMessages(); retrieveValueDataFormatMap(); } + + protected void initMessages(){ + msgs = GWT.create(ChangeColumnTypeMessages.class); + msgsCommon = GWT.create(CommonMessages.class); + } protected void retrieveValueDataFormatMap() { @@ -179,7 +186,7 @@ public class ChangeColumnTypePanel extends FramedPanel implements Log.debug("Error retrieving value data formats map: " + caught.getLocalizedMessage()); - UtilsGXT3.alert("Error", + UtilsGXT3.alert(msgsCommon.error(), msgs.errorRetrievingValueDataFormatsMap()); } @@ -214,12 +221,12 @@ public class ChangeColumnTypePanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.debug("Error retrieving column: " @@ -237,7 +244,7 @@ public class ChangeColumnTypePanel extends FramedPanel implements public void onSuccess(ColumnData result) { Log.debug("Retrieved Column: " + result); if (result == null) { - UtilsGXT3.alert("Error", + UtilsGXT3.alert(msgsCommon.error(), msgs.requestColumnIsNull()); } columnRequested = result; @@ -864,17 +871,17 @@ public class ChangeColumnTypePanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.error("load combo failure:" + caught.getLocalizedMessage()); - UtilsGXT3.alert("Error", + UtilsGXT3.alert(msgsCommon.error(), msgs.errorRetrievingColumnsOfTabularResource() + trId.getId()); } @@ -1042,12 +1049,12 @@ public class ChangeColumnTypePanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.error("load column failure:" @@ -1105,7 +1112,7 @@ public class ChangeColumnTypePanel extends FramedPanel implements } } - // TODO + // protected void configureBtnChange(ColumnTypeCode columnTypeCode) { ColumnTypeCode sourceTypeCode = ColumnTypeCode .getColumnTypeCodeFromId(sourceColumnChangeType.getTypeCode()); @@ -1178,17 +1185,17 @@ public class ChangeColumnTypePanel extends FramedPanel implements .setValueDataFormat(valueDataFormat); callChangeColumnType(); } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.typeFormatNotSelected()); } } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.columnDataTypeNotSelected()); } } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.columnDataTypeNotSelected()); } break; @@ -1211,15 +1218,15 @@ public class ChangeColumnTypePanel extends FramedPanel implements .setValueDataFormat(valueDataFormat); callChangeColumnType(); } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.typeFormatNotSelected()); } } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.columnDataTypeNotSelected()); } } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.columnDataTypeNotSelected()); } break; @@ -1236,7 +1243,7 @@ public class ChangeColumnTypePanel extends FramedPanel implements .getLocaleName()); callChangeColumnType(); } else { - UtilsGXT3.alert("Attention", msgs.noLocaleSelected()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.noLocaleSelected()); } break; case CODEDESCRIPTION: @@ -1262,7 +1269,7 @@ public class ChangeColumnTypePanel extends FramedPanel implements .setCodelistColumnReference(columnReference); callChangeColumnType(); } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.referenceColumnNotSelected()); } break; @@ -1280,25 +1287,25 @@ public class ChangeColumnTypePanel extends FramedPanel implements .setValueDataFormat(timeDataFormat); callChangeColumnType(); } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.timeFormatNotSelected()); } } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.periodTypeNotSelected()); } break; default: - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.thisColumnTypeIsNotSupportedForNow()); break; } } else { - UtilsGXT3.alert("Attention", msgs.selectAColumnType()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.selectAColumnType()); } } else { - UtilsGXT3.alert("Attention", msgs.selectAColumn()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.selectAColumn()); } } @@ -1312,12 +1319,12 @@ public class ChangeColumnTypePanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.debug("Change Column Type Error: " @@ -1379,12 +1386,12 @@ public class ChangeColumnTypePanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.debug("Error retrieving columns: " @@ -1422,12 +1429,12 @@ public class ChangeColumnTypePanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.debug("Error retrieving columns: " @@ -1467,12 +1474,12 @@ public class ChangeColumnTypePanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.debug("Error retrieving tabular resource: " @@ -1509,12 +1516,12 @@ public class ChangeColumnTypePanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.debug(caught.getLocalizedMessage()); @@ -1555,12 +1562,12 @@ public class ChangeColumnTypePanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.debug(caught.getLocalizedMessage()); @@ -1597,19 +1604,19 @@ public class ChangeColumnTypePanel extends FramedPanel implements protected void callColumnMappingDialog() { ColumnData selectedColumn = comboColumn.getCurrentValue(); if (selectedColumn == null) { - UtilsGXT3.alert("Attention", msgs.columnNotSelected()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.columnNotSelected()); return; } TabResource dimensionTR = comboDimensionType.getValue(); if (dimensionTR == null) { - UtilsGXT3.alert("Attention", msgs.codelistNotSelected()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.codelistNotSelected()); return; } ColumnData referenceColumn = comboColumnReferenceType.getValue(); if (referenceColumn == null) { - UtilsGXT3.alert("Attention", msgs.referenceColumnNotSelected()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.referenceColumnNotSelected()); return; } diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnDialog.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnDialog.java index 9b89198..2a99acb 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnDialog.java @@ -29,13 +29,16 @@ public class DeleteColumnDialog extends Window { } protected void create(TRId trId, String columnName, EventBus eventBus) { - msgs = GWT.create(DeleteColumnMessages.class); + initMessages(); initWindow(); - DeleteColumnPanel deleteColumnPanel= new DeleteColumnPanel(trId, columnName, eventBus); add(deleteColumnPanel); } + protected void initMessages(){ + msgs = GWT.create(DeleteColumnMessages.class); + } + protected void initWindow() { setWidth(WIDTH); setHeight(HEIGHT); diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnMessages.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnMessages.java index ba36d9e..ce60b18 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnMessages.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnMessages.java @@ -23,5 +23,20 @@ public interface DeleteColumnMessages extends Messages { // @DefaultMessage("Columns") String columnsLabel(); + + @DefaultMessage("Error retrieving columns") + String errorRetrievingColumnsHead(); + + @DefaultMessage("Error retrieving columns on server!") + String errorRetrievingColumns(); + + @DefaultMessage("Attention no column selected!") + String attentionNoColumnSelected(); + + @DefaultMessage("Delete Column Error") + String deleteColumnErrorHead(); + + @DefaultMessage("Error in invocation of delete column operation!") + String deleteColumnError(); } diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnPanel.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnPanel.java index af747d1..158d414 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnPanel.java @@ -13,6 +13,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpire import org.gcube.portlets.user.td.gwtservice.shared.tr.column.DeleteColumnSession; import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog; import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialogListener; +import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages; import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType; @@ -86,18 +87,26 @@ public class DeleteColumnPanel extends FramedPanel implements private ListStore store; private DeleteColumnMessages msgs; + private CommonMessages msgsCommon; public DeleteColumnPanel(TRId trId, String columnName, EventBus eventBus) { - msgs = GWT.create(DeleteColumnMessages.class); + this.trId = trId; this.columnName = columnName; this.eventBus = eventBus; Log.debug("DeleteColumnPanel(): [" + trId.toString() + " columnName: " + columnName + "]"); + initMessages(); init(); build(); } + protected void initMessages(){ + msgs = GWT.create(DeleteColumnMessages.class); + msgsCommon = GWT.create(CommonMessages.class); + } + + public void init() { setWidth(WIDTH); setHeight(HEIGHT); @@ -235,18 +244,18 @@ public class DeleteColumnPanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.error("load columns failure:" + caught.getLocalizedMessage()); - UtilsGXT3.alert("Error retrieving columns", - "Error retrieving columns"); + UtilsGXT3.alert(msgs.errorRetrievingColumnsHead(), + msgs.errorRetrievingColumns()); } } } @@ -277,7 +286,7 @@ public class DeleteColumnPanel extends FramedPanel implements protected void onDeleteColumns() { ArrayList columns = getSelectedItems(); if (columns == null || columns.size() < 1) { - UtilsGXT3.alert("Attention", "Attention no column selected!"); + UtilsGXT3.alert(msgsCommon.attention(), msgs.attentionNoColumnSelected()); return; } else { callDeleteColumn(columns); @@ -297,19 +306,19 @@ public class DeleteColumnPanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.debug("Delete Column Error: " + caught.getLocalizedMessage()); UtilsGXT3 - .alert("Delete Column Error ", - "Error in invocation of delete column operation!"); + .alert(msgs.deleteColumnErrorHead(), + msgs.deleteColumnError()); } } } diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/LabelColumnDialog.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/LabelColumnDialog.java index 5d24c38..0094abb 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/LabelColumnDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/LabelColumnDialog.java @@ -30,13 +30,19 @@ public class LabelColumnDialog extends Window { } protected void create(TRId trId, String columnName, EventBus eventBus) { - msgs = GWT.create(LabelColumnMessages.class); + initMessages(); initWindow(); LabelColumnPanel labelColumnPanel= new LabelColumnPanel(trId, columnName, eventBus); add(labelColumnPanel); } + protected void initMessages(){ + msgs = GWT.create(LabelColumnMessages.class); + } + + + protected void initWindow() { setWidth(WIDTH); setHeight(HEIGHT); diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/LabelColumnMessages.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/LabelColumnMessages.java index bd1e237..86896ad 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/LabelColumnMessages.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/LabelColumnMessages.java @@ -42,5 +42,8 @@ public interface LabelColumnMessages extends Messages { @DefaultMessage("Error in invocation of Change The Column Label operation!") String errorChangingTheColumnLabel(); + @DefaultMessage("Error retrieving columns of tabular resource!") + String errorRetrievingColumnsOfTabularResource(); + } diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/LabelColumnPanel.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/LabelColumnPanel.java index ae28de2..780661f 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/LabelColumnPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/LabelColumnPanel.java @@ -12,6 +12,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpire import org.gcube.portlets.user.td.gwtservice.shared.tr.column.LabelColumnSession; import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog; import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialogListener; +import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages; import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType; @@ -66,18 +67,24 @@ public class LabelColumnPanel extends FramedPanel implements private boolean updateStatus; private VerticalLayoutContainer v; private LabelColumnMessages msgs; + private CommonMessages msgsCommon; public LabelColumnPanel(TRId trId, String columnName, EventBus eventBus) { - msgs = GWT.create(LabelColumnMessages.class); this.trId = trId; this.eventBus = eventBus; updateStatus = false; Log.debug("LabelColumnPanel(): [" + trId + " columnName: " + columnName + "]"); + initMessages(); init(); retrieveColumns(); } + + protected void initMessages(){ + msgs = GWT.create(LabelColumnMessages.class); + msgsCommon = GWT.create(CommonMessages.class); + } protected void retrieveColumns() { TDGWTServiceAsync.INSTANCE.getColumns(trId, @@ -90,19 +97,18 @@ public class LabelColumnPanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.error("load combo failure:" + caught.getLocalizedMessage()); - UtilsGXT3.alert("Error", - "Error retrieving columns of tabular resource:" - + trId.getId()); + UtilsGXT3.alert(msgsCommon.error(), + msgs.errorRetrievingColumnsOfTabularResource()); } } } @@ -273,7 +279,7 @@ public class LabelColumnPanel extends FramedPanel implements labelColumnSession = new LabelColumnSession(trId, maps); callLabelColumn(); } else { - UtilsGXT3.alert("Attention", msgs.insertValidLabels()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.insertValidLabels()); } } @@ -289,12 +295,12 @@ public class LabelColumnPanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.debug("Change The Column Label Error: " @@ -309,7 +315,7 @@ public class LabelColumnPanel extends FramedPanel implements public void onSuccess(String taskId) { UtilsGXT3 - .info("Success", msgs.updatedLabels()); + .info(msgsCommon.success(), msgs.updatedLabels()); syncOpComplete(); //openMonitorDialog(taskId); diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/PositionColumnDialog.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/PositionColumnDialog.java index 22ed970..131fe42 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/PositionColumnDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/PositionColumnDialog.java @@ -21,13 +21,17 @@ public class PositionColumnDialog extends Window { private PositionColumnMessages msgs; public PositionColumnDialog(TRId trId, EventBus eventBus) { - msgs = GWT.create(PositionColumnMessages.class); + initMessages(); initWindow(); PositionColumnPanel changeColumnsPositionPanel= new PositionColumnPanel(trId, eventBus); add(changeColumnsPositionPanel); } + protected void initMessages(){ + msgs = GWT.create(PositionColumnMessages.class); + } + protected void initWindow() { setWidth(WIDTH); setHeight(HEIGHT); diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/PositionColumnPanel.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/PositionColumnPanel.java index f9190f9..29bffaa 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/PositionColumnPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/PositionColumnPanel.java @@ -11,6 +11,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalExcept import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException; import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException; import org.gcube.portlets.user.td.gwtservice.shared.tr.column.ChangeColumnsPositionSession; +import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages; import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType; @@ -84,16 +85,22 @@ public class PositionColumnPanel extends FramedPanel { private ListStore store; private PositionColumnMessages msgs; + private CommonMessages msgsCommon; public PositionColumnPanel(TRId trId, EventBus eventBus) { - msgs = GWT.create(PositionColumnMessages.class); this.trId = trId; this.eventBus = eventBus; Log.debug("ReorderColumnsPanel(): [" + trId.toString() + "]"); + initMessages(); init(); build(); } - + + protected void initMessages(){ + msgs = GWT.create(PositionColumnMessages.class); + msgsCommon = GWT.create(CommonMessages.class); + } + public void init() { setWidth(WIDTH); setHeight(HEIGHT); @@ -245,12 +252,12 @@ public class PositionColumnPanel extends FramedPanel { } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.error("load columns failure:" @@ -291,7 +298,7 @@ public class PositionColumnPanel extends FramedPanel { protected void onReorderColumns() { ArrayList columns = getReorderedColumns(); if (columns == null || columns.size() < 1) { - UtilsGXT3.alert("Attention", msgs.attentionNoColumnChange()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.attentionNoColumnChange()); return; } else { callReorderColumn(columns); @@ -314,18 +321,18 @@ public class PositionColumnPanel extends FramedPanel { } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.debug("Error changing the position of the columns: " + caught.getLocalizedMessage()); UtilsGXT3 - .alert("Error", + .alert(msgsCommon.error(), msgs.errorChangingPositionOfColumns()+caught.getLocalizedMessage()); } } @@ -334,7 +341,7 @@ public class PositionColumnPanel extends FramedPanel { public void onSuccess(Void result) { UtilsGXT3 - .info("Success", msgs.positionUpdated()); + .info(msgsCommon.success(), msgs.positionUpdated()); syncOpComplete(); //openMonitorDialog(taskId); diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchDialog.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchDialog.java index 7a1fe89..a929474 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchDialog.java @@ -17,6 +17,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.ReplaceEntry; import org.gcube.portlets.user.td.gwtservice.shared.tr.column.mapping.ColumnMappingData; import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog; import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialogListener; +import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages; import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType; @@ -43,14 +44,16 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler; * */ public class ReplaceBatchDialog extends Window implements MonitorDialogListener { + private static final String WIDTH = "650px"; + private static final String HEIGHT = "560px"; + protected enum CALLTYPE { REPLACEBATH, RESUME; } private ReplaceBatchMessages msgs; + private CommonMessages msgsCommon; - private static final String WIDTH = "650px"; - private static final String HEIGHT = "560px"; private TRId trId; private EventBus eventBus; @@ -58,6 +61,9 @@ public class ReplaceBatchDialog extends Window implements MonitorDialogListener private CALLTYPE callType; private InvocationS invocationS; private ConditionCode conditionCode; // For Curation + + + /** @@ -108,6 +114,7 @@ public class ReplaceBatchDialog extends Window implements MonitorDialogListener protected void initMessages(){ msgs = GWT.create(ReplaceBatchMessages.class); + msgsCommon = GWT.create(CommonMessages.class); } /** @@ -262,12 +269,12 @@ public class ReplaceBatchDialog extends Window implements MonitorDialogListener } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.error("Start Replace Batch failed:" @@ -316,12 +323,12 @@ public class ReplaceBatchDialog extends Window implements MonitorDialogListener } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.error("Task Resume failed:" @@ -363,12 +370,12 @@ public class ReplaceBatchDialog extends Window implements MonitorDialogListener } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.error("Task Resume failed:" @@ -429,15 +436,7 @@ public class ReplaceBatchDialog extends Window implements MonitorDialogListener } - /** - * - protected void callChangeColumnTypeProgressDialog() { - * ChangeColumnTypeProgressDialog changeColumnTypeProgressDialog = new - * ChangeColumnTypeProgressDialog( eventBus); - * changeColumnTypeProgressDialog.addProgressDialogListener(this); - * changeColumnTypeProgressDialog.show(); } - */ - + // / protected void openMonitorDialog(String taskId) { MonitorDialog monitorDialog = new MonitorDialog(taskId, eventBus); diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchPanel.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchPanel.java index e579ef8..b453ae1 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchPanel.java @@ -27,6 +27,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.OccurrencesForRepla import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.ReplaceBatchColumnSession; import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.ReplaceEntry; import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.ShowOccurrencesType; +import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages; import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType; import org.gcube.portlets.user.td.widgetcommonevent.shared.CellData; @@ -102,7 +103,6 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar; public class ReplaceBatchPanel extends FramedPanel implements SingleValueReplaceListener, DimensionRowSelectionListener, ConnectCodelistListener { - private ReplaceBatchMessages msgs; private static final String WIDTH = "560px"; private static final String HEIGHT = "550px"; private static final String GRID_HEIGHT = "344px"; @@ -110,7 +110,10 @@ public class ReplaceBatchPanel extends FramedPanel implements private static final String CONNECTION_FIELD_WIDTH = "470px"; private static final int SHOW_OCCURENCE_TYPE_WIDTH = 100; private static final String COMBOCOLS_WIDTH = "510px"; - + + private ReplaceBatchMessages msgs; + private CommonMessages msgsCommon; + private EventBus eventBus; private TRId trId; private ArrayList columns; @@ -151,6 +154,7 @@ public class ReplaceBatchPanel extends FramedPanel implements private boolean simpleReplace; private ComboBox comboCols; + public ReplaceBatchPanel(ReplaceBatchDialog parent, TRId trId, RequestProperties requestProperties, EventBus eventBus) { @@ -205,6 +209,7 @@ public class ReplaceBatchPanel extends FramedPanel implements protected void initMessages(){ msgs = GWT.create(ReplaceBatchMessages.class); + msgsCommon = GWT.create(CommonMessages.class); } protected void init() { @@ -666,12 +671,12 @@ public class ReplaceBatchPanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.error("load column failure:" @@ -721,12 +726,12 @@ public class ReplaceBatchPanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.error("load column failure:" @@ -813,12 +818,12 @@ public class ReplaceBatchPanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.error("load columns failure:" @@ -840,7 +845,7 @@ public class ReplaceBatchPanel extends FramedPanel implements callback.onSuccess(loadedResult); } catch (Throwable e) { Log.error("Too many different occurrences"); - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.tooManyDifferentOccurrences()); } } @@ -991,7 +996,7 @@ public class ReplaceBatchPanel extends FramedPanel implements if (effectiveReplaceList.size() == 0) { UtilsGXT3 - .alert("Attention", msgs.selectAtLeastOneValueToReplace()); + .alert(msgsCommon.attention(), msgs.selectAtLeastOneValueToReplace()); btnSave.enable(); } else { startReplaceBatch(effectiveReplaceList); @@ -1224,12 +1229,12 @@ public class ReplaceBatchPanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.error("load column failure:" @@ -1264,12 +1269,12 @@ public class ReplaceBatchPanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.error("load column failure:" diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/SingleValueReplacePanel.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/SingleValueReplacePanel.java index c3cd203..580c8a4 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/SingleValueReplacePanel.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/SingleValueReplacePanel.java @@ -4,6 +4,7 @@ import java.util.Date; import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle; import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3; +import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages; import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; import com.allen_sauer.gwt.log.client.Log; @@ -48,6 +49,7 @@ public class SingleValueReplacePanel extends FramedPanel { private TextButton btnClose; private SingleValueReplaceMessages msgs; + private CommonMessages msgsCommon; public SingleValueReplacePanel(SingleValueReplaceDialog parent, String value, String replaceValue, ColumnData column, @@ -65,6 +67,7 @@ public class SingleValueReplacePanel extends FramedPanel { protected void initMessages() { msgs = GWT.create(SingleValueReplaceMessages.class); + msgsCommon = GWT.create(CommonMessages.class); } protected void initPanel() { @@ -132,13 +135,13 @@ public class SingleValueReplacePanel extends FramedPanel { protected void replaceValue() { String rValue = replaceValueField.getCurrentValue(); if (rValue == null || rValue.isEmpty()) { - UtilsGXT3.alert("Attention", msgs.insertAValidReplaceValue()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.insertAValidReplaceValue()); } else { String checkedValue = checkTypeData(rValue); if (checkedValue != null && !checkedValue.isEmpty()) { callReplaceValue(rValue); } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.insertAValidReplaceValueForThisColumn()); } } diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/create/AddColumnPanel.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/create/AddColumnPanel.java index ebe34c0..cda12a5 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/create/AddColumnPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/create/AddColumnPanel.java @@ -30,6 +30,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource; import org.gcube.portlets.user.td.gwtservice.shared.tr.column.AddColumnSession; import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog; import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialogListener; +import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages; import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.expression.ExpressionWrapper; @@ -132,6 +133,7 @@ public class AddColumnPanel extends FramedPanel implements private TextButton btnRemoveExpression; private TextButton btnAddExpression; private AddColumnMessages msgs; + private CommonMessages msgsCommon; /** * @@ -168,6 +170,7 @@ public class AddColumnPanel extends FramedPanel implements protected void initMessages() { msgs = GWT.create(AddColumnMessages.class); + msgsCommon = GWT.create(CommonMessages.class); } protected void init() { @@ -779,12 +782,12 @@ public class AddColumnPanel extends FramedPanel implements columnMockUp); callAddColumm(); } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.columnDataTypeNotSelected()); } } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.columnDataTypeNotSelected()); } break; @@ -828,7 +831,7 @@ public class AddColumnPanel extends FramedPanel implements callAddColumm(); // } else { // UtilsGXT3 - // .alert("Attention", + // .alert(msgsCommon.attention(), // "The default value is not a valid text representation for geometry type ( e.g. POINT(34 56) or LINESTRING(65 34, 56.43 78.65)!"); // } } else { @@ -893,11 +896,11 @@ public class AddColumnPanel extends FramedPanel implements } } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.columnDataTypeNotSelected()); } } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.columnDataTypeNotSelected()); } break; @@ -951,7 +954,7 @@ public class AddColumnPanel extends FramedPanel implements columnMockUp); callAddColumm(); } else { - UtilsGXT3.alert("Attention", msgs.noLocaleSelected()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.noLocaleSelected()); } break; @@ -965,7 +968,7 @@ public class AddColumnPanel extends FramedPanel implements columnMockUp); callAddColumm(); } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.noColumnReferenceSelected()); } break; @@ -980,17 +983,17 @@ public class AddColumnPanel extends FramedPanel implements callAddColumm(); } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.timeDimensionTypeNotSelected()); } break; default: - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.thisColumnTypeIsNotSupported()); break; } } else { - UtilsGXT3.alert("Attention", msgs.selectAColumnType()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.selectAColumnType()); } } else { UtilsGXT3.alert("Attntion", msgs.insertAValidLabel()); @@ -1019,12 +1022,12 @@ public class AddColumnPanel extends FramedPanel implements columnMockUp = new ColumnMockUp(null, null, labelS, type, dataType, ""); } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.columnDataTypeNotSelected()); } } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.columnDataTypeNotSelected()); } break; @@ -1039,11 +1042,11 @@ public class AddColumnPanel extends FramedPanel implements type, dataType, ""); } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.columnDataTypeNotSelected()); } } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.columnDataTypeNotSelected()); } break; @@ -1062,7 +1065,7 @@ public class AddColumnPanel extends FramedPanel implements type, locale.getLocaleName(), ""); } else { - UtilsGXT3.alert("Attention", msgs.noLocaleSelected()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.noLocaleSelected()); } break; case DIMENSION: @@ -1073,7 +1076,7 @@ public class AddColumnPanel extends FramedPanel implements type, columnReference, ""); } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.noColumnReferenceSelected()); } break; @@ -1085,20 +1088,20 @@ public class AddColumnPanel extends FramedPanel implements type, periodDataType, ""); } else { - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.timeDimensionTypeNotSelected()); } break; default: - UtilsGXT3.alert("Attention", + UtilsGXT3.alert(msgsCommon.attention(), msgs.thisColumnTypeIsNotSupported()); break; } } else { - UtilsGXT3.alert("Attention", msgs.selectAColumnType()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.selectAColumnType()); } } else { - UtilsGXT3.alert("Attention", msgs.insertAValidLabel()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.insertAValidLabel()); } return columnMockUp; @@ -1115,18 +1118,18 @@ public class AddColumnPanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.debug("Add Column Error: " + caught.getLocalizedMessage()); UtilsGXT3.alert( - "Add Column Error ", + msgsCommon.error(), msgs.errorInInvocationOfAddColumnOperation()); } } @@ -1181,12 +1184,12 @@ public class AddColumnPanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.debug("Error retrieving columns: " @@ -1224,12 +1227,12 @@ public class AddColumnPanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.debug(caught.getLocalizedMessage()); @@ -1271,12 +1274,12 @@ public class AddColumnPanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.debug(caught.getLocalizedMessage()); diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/create/CreateDefColumnPanel.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/create/CreateDefColumnPanel.java index 412e675..ad1293c 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/create/CreateDefColumnPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/create/CreateDefColumnPanel.java @@ -13,6 +13,7 @@ import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync; import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException; import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException; import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException; +import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages; import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType; import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.TableType; @@ -82,6 +83,7 @@ public class CreateDefColumnPanel extends FramedPanel { private TextField columnLabel; private TextField defaultValue; private CreateDefColumnMessages msgs; + private CommonMessages msgsCommon; /** * @@ -104,6 +106,7 @@ public class CreateDefColumnPanel extends FramedPanel { protected void initMessages(){ msgs = GWT.create(CreateDefColumnMessages.class); + msgsCommon = GWT.create(CommonMessages.class); } protected void init() { @@ -271,18 +274,18 @@ public class CreateDefColumnPanel extends FramedPanel { Log.debug("CheckValue: label: " + lab + ", type: " + typeElement + ", locale: " + localeElement + ", default: " + valueDefault); if (lab == null || lab.isEmpty()) { - UtilsGXT3.alert("Attention", msgs.addALabel()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.addALabel()); btnSave.enable(); return; } if (typeElement == null) { - UtilsGXT3.alert("Attention", msgs.noTypeSelected()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.noTypeSelected()); btnSave.enable(); return; } else { if (typeElement.getCode() == null) { - UtilsGXT3.alert("Attention", msgs.noTypeSelected()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.noTypeSelected()); btnSave.enable(); return; } else { @@ -302,13 +305,13 @@ public class CreateDefColumnPanel extends FramedPanel { break; case CODENAME: if (localeElement == null) { - UtilsGXT3.alert("Attention", msgs.noLocaleSelected()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.noLocaleSelected()); btnSave.enable(); return; } else { if (localeElement.getLocaleName() == null || localeElement.getLocaleName().isEmpty()) { - UtilsGXT3.alert("Attention", msgs.noLocaleSelected()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.noLocaleSelected()); btnSave.enable(); return; } else { @@ -400,12 +403,12 @@ public class CreateDefColumnPanel extends FramedPanel { } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.debug(caught.getLocalizedMessage()); diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/dimension/CodelistSelectionDialog.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/dimension/CodelistSelectionDialog.java index 3afb591..9c765f5 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/dimension/CodelistSelectionDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/dimension/CodelistSelectionDialog.java @@ -17,6 +17,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.paging.CodelistPagingLoad import org.gcube.portlets.user.td.gwtservice.shared.tr.paging.CodelistPagingLoadResult; import org.gcube.portlets.user.td.gwtservice.shared.tr.paging.Direction; import org.gcube.portlets.user.td.gwtservice.shared.tr.paging.OrderInfo; +import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages; import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType; @@ -95,16 +96,22 @@ public class CodelistSelectionDialog extends Window { private ResourceBundle res; private TextButton btnSelect; + private CommonMessages msgsCommon; public CodelistSelectionDialog(EventBus eventBus) { Log.info("Dialog CodelistSelection"); this.eventBus = eventBus; listeners = new ArrayList(); + initMessages(); initWindow(); create(); } + protected void initMessages(){ + msgsCommon = GWT.create(CommonMessages.class); + } + protected void initWindow() { setWidth(WIDTH); @@ -256,18 +263,18 @@ public class CodelistSelectionDialog extends Window { } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { - Log.debug("Attention", + Log.debug(msgsCommon.attention(), "This tabular resource does not have a valid table"); UtilsGXT3 - .alert("Attention", + .alert(msgsCommon.attention(), msgs.thisTabularResourceDoesHaveAValidTable()); } } @@ -283,7 +290,7 @@ public class CodelistSelectionDialog extends Window { }); } else { - UtilsGXT3.alert("Attention", msgs.selectACodelist()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.selectACodelist()); } } @@ -337,12 +344,12 @@ public class CodelistSelectionDialog extends Window { } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.debug("Error Retrieving Codelist", @@ -381,12 +388,12 @@ public class CodelistSelectionDialog extends Window { } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.debug( diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/dimension/ConnectCodelistDialog.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/dimension/ConnectCodelistDialog.java index 9defccf..07c525a 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/dimension/ConnectCodelistDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/dimension/ConnectCodelistDialog.java @@ -11,6 +11,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalExcept import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException; import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException; import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource; +import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages; import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType; import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; @@ -66,6 +67,7 @@ public class ConnectCodelistDialog extends Window implements private TextButton btnConnect; private TextButton btnClose; private ConnectCodelistMessages msgs; + private CommonMessages msgsCommon; public ConnectCodelistDialog(EventBus eventBus) { listeners = new ArrayList(); @@ -78,6 +80,7 @@ public class ConnectCodelistDialog extends Window implements protected void initMessages(){ msgs = GWT.create(ConnectCodelistMessages.class); + msgsCommon = GWT.create(CommonMessages.class); } @@ -212,12 +215,12 @@ public class ConnectCodelistDialog extends Window implements TabResource codelist = comboDimensionType.getCurrentValue(); if (codelist == null) { Log.debug("No codelist selected"); - UtilsGXT3.alert("Attention", msgs.selectAValidCodelist()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.selectAValidCodelist()); } else { ColumnData connection = comboColumnReferenceType.getCurrentValue(); if (connection == null) { Log.debug("No connection selected"); - UtilsGXT3.alert("Attention", msgs.selectAValidColumn()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.selectAValidColumn()); } else { fireCompleted(connection); } @@ -267,12 +270,12 @@ public class ConnectCodelistDialog extends Window implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.debug("Error retrieving columns: " diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/dimension/DimensionRowSelectionDialog.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/dimension/DimensionRowSelectionDialog.java index 10f44c4..a305823 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/dimension/DimensionRowSelectionDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/dimension/DimensionRowSelectionDialog.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3; import org.gcube.portlets.user.td.gwtservice.shared.tr.DimensionRow; +import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages; import org.gcube.portlets.user.td.widgetcommonevent.shared.CellData; import org.gcube.portlets.user.td.widgetcommonevent.shared.Constants; import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; @@ -56,6 +57,7 @@ public class DimensionRowSelectionDialog extends Window { private TextField value; private TextButton btnSelect; private DimensionRowSelectionMessages msgs; + private CommonMessages msgsCommon; public DimensionRowSelectionDialog(ColumnData column, CellData cellData, EventBus eventBus) { @@ -116,6 +118,7 @@ public class DimensionRowSelectionDialog extends Window { protected void initMessages(){ msgs = GWT.create(DimensionRowSelectionMessages.class); + msgsCommon = GWT.create(CommonMessages.class); } @@ -179,7 +182,7 @@ public class DimensionRowSelectionDialog extends Window { } else { UtilsGXT3 - .alert("Attention", + .alert(msgsCommon.attention(), msgs.noValidViewColumnAssociatedWithThisColumn()); hide(); return; @@ -216,7 +219,7 @@ public class DimensionRowSelectionDialog extends Window { ArrayList rowsId = gridPanel.getSelectedRowsId(); if (rowsId == null || rowsId.size() == 0) { Log.debug("No row selected"); - UtilsGXT3.alert("Attention", msgs.selectARow()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.selectARow()); } else { String rowId = rowsId.get(0); Log.debug("Row selected: " + rowId); @@ -233,7 +236,7 @@ public class DimensionRowSelectionDialog extends Window { .getRelationship().getTargetColumnId()); } else { UtilsGXT3 - .alert("Attention", + .alert(msgsCommon.attention(), msgs.noValidViewColumnAssociatedWithThisColumn()); hide(); return; @@ -243,10 +246,10 @@ public class DimensionRowSelectionDialog extends Window { if (cellValues == null || cellValues.size() == 0) { Log.debug("No value retrieved"); - UtilsGXT3.alert("Attention", msgs.selectARow()); + UtilsGXT3.alert(msgsCommon.attention(), msgs.selectARow()); } else { String cellValue = cellValues.get(0); - Log.debug("Retrived: " + rowId + " " + cellValue); + Log.debug("Retrieved: " + rowId + " " + cellValue); dimRow = new DimensionRow(rowId, cellValue); fireCompleted(dimRow); } @@ -268,7 +271,7 @@ public class DimensionRowSelectionDialog extends Window { .getTargetTableId()); } else { UtilsGXT3 - .alert("Attention", + .alert(msgsCommon.attention(), msgs.noValidRelationshipAssociatedWithThisColumn()); hide(); return; diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingDialog.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingDialog.java index 974487f..d707714 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingDialog.java @@ -8,6 +8,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; import com.allen_sauer.gwt.log.client.Log; +import com.google.gwt.core.client.GWT; import com.google.web.bindery.event.shared.EventBus; import com.sencha.gxt.widget.core.client.Window; import com.sencha.gxt.widget.core.client.event.SelectEvent; @@ -20,16 +21,11 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler; * */ public class ColumnMappingDialog extends Window { - protected String WIDTH = "530px"; - protected String HEIGHT = "450px"; - - protected TRId trId; - protected ColumnData selectedColumn; - protected TabResource dimensionTR; - protected ColumnData referenceColumn; - protected EventBus eventBus; + private static final String WIDTH = "530px"; + private static final String HEIGHT = "450px"; - protected ArrayList listeners; + private ArrayList listeners; + private ColumnMappingMessages msgs; /** * @@ -42,18 +38,13 @@ public class ColumnMappingDialog extends Window { public ColumnMappingDialog(TRId trId, ColumnData selectedColumn, TabResource dimensionTR, ColumnData referenceColumn, EventBus eventBus) { - this.trId = trId; - this.selectedColumn = selectedColumn; - this.dimensionTR = dimensionTR; - this.referenceColumn= referenceColumn; - this.eventBus = eventBus; Log.debug("ColumnMappingDialog: [trId:" + trId + ", selectedColumn:" + selectedColumn + ", dimensionTR:" + dimensionTR + ", columnReference:" + referenceColumn + ", eventBus:" + eventBus + "]"); listeners=new ArrayList(); - + initMessages(); initWindow(); ColumnMappingPanel columnMappingPanel = new ColumnMappingPanel(this, trId, selectedColumn, @@ -62,6 +53,11 @@ public class ColumnMappingDialog extends Window { add(columnMappingPanel); } + + protected void initMessages(){ + msgs = GWT.create(ColumnMappingMessages.class); + } + /** * */ @@ -70,7 +66,7 @@ public class ColumnMappingDialog extends Window { setHeight(HEIGHT); setBodyBorder(false); setResizable(false); - setHeadingText("Column Mapping"); + setHeadingText(msgs.dialogHead()); setClosable(true); setModal(true); forceLayoutOnResize = true; diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingMessages.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingMessages.java new file mode 100644 index 0000000..8cfa36b --- /dev/null +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingMessages.java @@ -0,0 +1,40 @@ +package org.gcube.portlets.user.td.columnwidget.client.mapping; + +import com.google.gwt.i18n.client.Messages; + +/** + * + * @author giancarlo email: g.panichi@isti.cnr.it + * + */ +public interface ColumnMappingMessages extends Messages { + + @DefaultMessage("Column Mapping") + String dialogHead(); + + @DefaultMessage("Save") + String btnSaveText(); + + @DefaultMessage("Save") + String btnSaveToolTip(); + + @DefaultMessage("Close") + String btnCloseText(); + + @DefaultMessage("Close") + String btnCloseToolTip(); + + @DefaultMessage("Select rows") + String rowsLabel(); + + @DefaultMessage("Creates a valid mapping!") + String createAValidMapping(); + + @DefaultMessage("Select a source...") + String comboSourceValueEmptyText(); + + @DefaultMessage("Select a target...") + String comboTargetValueEmptyText(); + +} diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingPanel.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingPanel.java index 408965a..7aa4961 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingPanel.java @@ -12,6 +12,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.DimensionRow; import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource; import org.gcube.portlets.user.td.gwtservice.shared.tr.column.mapping.ColumnMappingData; import org.gcube.portlets.user.td.gwtservice.shared.tr.column.mapping.ColumnMappingList; +import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages; import org.gcube.portlets.user.td.widgetcommonevent.shared.CellData; import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; @@ -49,32 +50,29 @@ import com.sencha.gxt.widget.core.client.form.FieldLabel; * */ public class ColumnMappingPanel extends FramedPanel { - protected static final String WIDTH = "520px"; - protected static final String HEIGHT = "400px"; - protected static final String COMBOWIDTH = "220px"; - protected static final String CONTAINERHEIGHT = "340px"; - protected static final String CONTAINERWIDTH = "500px"; + private static final String COMBOWIDTH = "220px"; + private static final String CONTAINERHEIGHT = "340px"; + private static final String CONTAINERWIDTH = "500px"; - protected ColumnMappingPanel thisPanel; + private ColumnMappingPanel thisPanel; + private ColumnMappingDialog parent; + private ColumnData selectedColumn; + private ColumnData referenceColumn; + private EventBus eventBus; - protected ColumnMappingDialog parent; - protected TRId trId; - protected ColumnData selectedColumn; - protected TabResource dimensionTR; - protected ColumnData referenceColumn; - protected EventBus eventBus; + private VerticalLayoutContainer vert; + private String itemIdSourceValueArg; + private String itemIdTargetValueArg; + private String itemIdBtnAdd; + private String itemIdBtnDel; - protected VerticalLayoutContainer vert; - protected String itemIdSourceValueArg; - protected String itemIdTargetValueArg; - protected String itemIdBtnAdd; - protected String itemIdBtnDel; - - protected ColumnMappingList columnMappingList; - protected ArrayList mapping; + private ColumnMappingList columnMappingList; + private ArrayList mapping; private TextButton btnSave; private TextButton btnClose; + private ColumnMappingMessages msgs; + private CommonMessages msgsCommon; /** * @@ -90,9 +88,7 @@ public class ColumnMappingPanel extends FramedPanel { ColumnData selectedColumn, TabResource dimensionTR, ColumnData referenceColumn, EventBus eventBus) { this.parent = parent; - this.trId = trId; this.selectedColumn = selectedColumn; - this.dimensionTR = dimensionTR; this.referenceColumn = referenceColumn; this.eventBus = eventBus; thisPanel = this; @@ -102,10 +98,16 @@ public class ColumnMappingPanel extends FramedPanel { + ", eventBus:" + eventBus + "]"); columnMappingList = new ColumnMappingList(); mapping = new ArrayList(); + initMessages(); initPanel(); create(); } + protected void initMessages() { + msgs = GWT.create(ColumnMappingMessages.class); + msgsCommon = GWT.create(CommonMessages.class); + } + protected void initPanel() { setHeaderVisible(false); setBodyBorder(false); @@ -120,10 +122,10 @@ public class ColumnMappingPanel extends FramedPanel { container.setHeight(CONTAINERHEIGHT); container.setWidth(CONTAINERWIDTH); - btnSave = new TextButton("Save"); + btnSave = new TextButton(msgs.btnSaveText()); btnSave.setIcon(ResourceBundle.INSTANCE.save()); btnSave.setIconAlign(IconAlign.RIGHT); - btnSave.setToolTip("Save"); + btnSave.setToolTip(msgs.btnSaveToolTip()); btnSave.addSelectHandler(new SelectHandler() { public void onSelect(SelectEvent event) { @@ -134,10 +136,10 @@ public class ColumnMappingPanel extends FramedPanel { } }); - btnClose = new TextButton("Close"); + btnClose = new TextButton(msgs.btnCloseText()); btnClose.setIcon(ResourceBundle.INSTANCE.close()); btnClose.setIconAlign(IconAlign.RIGHT); - btnClose.setToolTip("Close"); + btnClose.setToolTip(msgs.btnCloseToolTip()); btnClose.addSelectHandler(new SelectHandler() { public void onSelect(SelectEvent event) { @@ -162,7 +164,7 @@ public class ColumnMappingPanel extends FramedPanel { container.add(vert); container.forceLayout(); - FieldLabel rowsLabel = new FieldLabel(null, "Select rows"); + FieldLabel rowsLabel = new FieldLabel(null, msgs.rowsLabel()); rowsLabel.getElement().applyStyles("font-weight:bold"); VerticalLayoutContainer vPanel = new VerticalLayoutContainer(); @@ -205,7 +207,7 @@ public class ColumnMappingPanel extends FramedPanel { parent.saveMapping(columnMappingList); } } else { - UtilsGXT3.info("Attention", "Creates a valid mapping"); + UtilsGXT3.info(msgsCommon.attention(), msgs.createAValidMapping()); btnSave.enable(); } @@ -269,7 +271,8 @@ public class ColumnMappingPanel extends FramedPanel { selectedColumn.getLabel(), null, 0, 0); DimensionRowSelectionDialog dimensionRowSelectionDialog = new DimensionRowSelectionDialog( - selectedColumn, cellData, true, false, true, false, true, eventBus); + selectedColumn, cellData, true, false, true, false, + true, eventBus); dimensionRowSelectionDialog .addListener(sourceValueSelectedListener); dimensionRowSelectionDialog.show(); @@ -278,7 +281,7 @@ public class ColumnMappingPanel extends FramedPanel { }); - comboSourceValue.setEmptyText("Select a source..."); + comboSourceValue.setEmptyText(msgs.comboSourceValueEmptyText()); comboSourceValue.setWidth(COMBOWIDTH); comboSourceValue.setEditable(false); comboSourceValue.setTriggerAction(TriggerAction.ALL); @@ -330,7 +333,8 @@ public class ColumnMappingPanel extends FramedPanel { .getLabel(), null, 0, 0); DimensionRowSelectionDialog dimensionRowSelectionDialog = new DimensionRowSelectionDialog( - referenceColumn, cellData, true, false, true, false, true, eventBus); + referenceColumn, cellData, true, false, true, false, + true, eventBus); dimensionRowSelectionDialog .addListener(targetValueSelectedListener); dimensionRowSelectionDialog.show(); @@ -339,7 +343,7 @@ public class ColumnMappingPanel extends FramedPanel { }); - comboTargetValue.setEmptyText("Select a target..."); + comboTargetValue.setEmptyText(msgs.comboTargetValueEmptyText()); comboTargetValue.setWidth(COMBOWIDTH); comboTargetValue.setEditable(false); comboTargetValue.setTriggerAction(TriggerAction.ALL); @@ -440,7 +444,8 @@ public class ColumnMappingPanel extends FramedPanel { selectedColumn.getLabel(), null, 0, 0); DimensionRowSelectionDialog dimensionRowSelectionDialog = new DimensionRowSelectionDialog( - selectedColumn, cellData, true, false, true, false, true, eventBus); + selectedColumn, cellData, true, false, true, false, + true, eventBus); dimensionRowSelectionDialog .addListener(sourceValueSelectedListener); dimensionRowSelectionDialog.show(); @@ -449,7 +454,7 @@ public class ColumnMappingPanel extends FramedPanel { }); - comboSourceValue.setEmptyText("Select a source..."); + comboSourceValue.setEmptyText(msgs.comboSourceValueEmptyText()); comboSourceValue.setWidth(COMBOWIDTH); comboSourceValue.setEditable(false); comboSourceValue.setTriggerAction(TriggerAction.ALL); @@ -501,7 +506,8 @@ public class ColumnMappingPanel extends FramedPanel { .getLabel(), null, 0, 0); DimensionRowSelectionDialog dimensionRowSelectionDialog = new DimensionRowSelectionDialog( - referenceColumn, cellData, true, false, true, false, true, eventBus); + referenceColumn, cellData, true, false, true, false, + true, eventBus); dimensionRowSelectionDialog .addListener(targetValueSelectedListener); dimensionRowSelectionDialog.show(); @@ -510,7 +516,7 @@ public class ColumnMappingPanel extends FramedPanel { }); - comboTargetValue.setEmptyText("Select a target..."); + comboTargetValue.setEmptyText(msgs.comboTargetValueEmptyText()); comboTargetValue.setWidth(COMBOWIDTH); comboTargetValue.setEditable(false); comboTargetValue.setTriggerAction(TriggerAction.ALL); diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllDialog.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllDialog.java index cefb840..005ca91 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllDialog.java @@ -4,6 +4,7 @@ import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle; import org.gcube.portlets.user.td.widgetcommonevent.shared.CellData; import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; +import com.google.gwt.core.client.GWT; import com.google.web.bindery.event.shared.EventBus; import com.sencha.gxt.widget.core.client.Window; import com.sencha.gxt.widget.core.client.event.SelectEvent; @@ -16,15 +17,16 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler; * */ public class ReplaceAllDialog extends Window { - protected String WIDTH = "500px"; - protected String HEIGHT = "150px"; - protected ReplaceAllPanel ReplacePanel; - protected CellData cellData; - protected TRId trId; - protected EventBus eventBus; + private static final String WIDTH = "500px"; + private static final String HEIGHT = "150px"; + private CellData cellData; + private TRId trId; + private EventBus eventBus; + private ReplaceAllMessages msgs; public ReplaceAllDialog(CellData cellData, TRId trId, EventBus eventBus) { + initMessages(); initWindow(); this.cellData = cellData; this.trId = trId; @@ -32,13 +34,17 @@ public class ReplaceAllDialog extends Window { create(); } + + protected void initMessages(){ + msgs = GWT.create(ReplaceAllMessages.class); + } protected void initWindow() { setWidth(WIDTH); setHeight(HEIGHT); setBodyBorder(false); setResizable(false); - setHeadingText("Replace All"); + setHeadingText(msgs.dialogHead()); setClosable(true); getHeader().setIcon(ResourceBundle.INSTANCE.replaceAll()); diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllMessages.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllMessages.java new file mode 100644 index 0000000..4452e9b --- /dev/null +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllMessages.java @@ -0,0 +1,46 @@ +package org.gcube.portlets.user.td.columnwidget.client.replace; + +import com.google.gwt.i18n.client.Messages; + +/** + * + * @author giancarlo email: g.panichi@isti.cnr.it + * + */ +public interface ReplaceAllMessages extends Messages { + + @DefaultMessage("Replace All") + String dialogHead(); + + @DefaultMessage("Replace") + String btnReplaceText(); + + @DefaultMessage("Replace Value") + String btnReplaceToolTip(); + + @DefaultMessage("Close") + String btnCloseText(); + + @DefaultMessage("Close") + String btnCloseToolTip(); + + @DefaultMessage("Current Value") + String currentValue(); + + @DefaultMessage("Replacement") + String replacement(); + + @DefaultMessage("Select a value...") + String selectAValue(); + + @DefaultMessage("Insert a valid replace value!") + String insertAValidReplaceValue(); + + @DefaultMessage("Insert a valid replace value for this column!") + String insertAValidReplaceValueForThisColumn(); + + @DefaultMessage( "Select a valid value!") + String selectAValidValue(); + +} diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllPanel.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllPanel.java index 94ec174..89ac346 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllPanel.java @@ -15,6 +15,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.DimensionRow; import org.gcube.portlets.user.td.gwtservice.shared.tr.column.ReplaceColumnSession; import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog; import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialogListener; +import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages; import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType; @@ -60,9 +61,6 @@ import com.sencha.gxt.widget.core.client.form.TextField; */ public class ReplaceAllPanel extends FramedPanel implements DimensionRowSelectionListener, MonitorDialogListener { - private static final String REPLACEMENT = "Replacement"; - private static final String CURRENT_VALUE = "Current Value"; - private DateTimeFormat sdf = DateTimeFormat.getFormat("yyyy-MM-dd"); private String WIDTH = "500px"; @@ -83,9 +81,11 @@ public class ReplaceAllPanel extends FramedPanel implements private DateField valueDate; private TextField replaceValue; private DateField replaceValueDate; - private TextButton btnApply; + private TextButton btnReplace; private TextButton btnClose; private boolean isDimension; + private ReplaceAllMessages msgs; + private CommonMessages msgsCommon; public ReplaceAllPanel(ReplaceAllDialog parent, TRId trId, CellData cellData, EventBus eventBus) { @@ -95,10 +95,16 @@ public class ReplaceAllPanel extends FramedPanel implements this.eventBus = eventBus; dimensionRow = null; Log.debug("ReplacePanel:[" + trId + ", CellData:" + cellData + "]"); + initMessages(); initPanel(); retrieveColumn(); } + + protected void initMessages(){ + msgs = GWT.create(ReplaceAllMessages.class); + msgsCommon = GWT.create(CommonMessages.class); + } protected void initPanel() { setWidth(WIDTH); @@ -118,17 +124,17 @@ public class ReplaceAllPanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.error("Error retrieving column: " + caught.getMessage()); - UtilsGXT3.alert("Error retrieving column", + UtilsGXT3.alert(msgsCommon.error(), caught.getMessage()); } } @@ -177,11 +183,11 @@ public class ReplaceAllPanel extends FramedPanel implements replaceValue = new TextField(); } - btnApply = new TextButton("Replace"); - btnApply.setIcon(ResourceBundle.INSTANCE.replaceAll()); - btnApply.setIconAlign(IconAlign.RIGHT); - btnApply.setToolTip("Replace Value"); - btnApply.addSelectHandler(new SelectHandler() { + btnReplace = new TextButton(msgs.btnReplaceText()); + btnReplace.setIcon(ResourceBundle.INSTANCE.replaceAll()); + btnReplace.setIconAlign(IconAlign.RIGHT); + btnReplace.setToolTip(msgs.btnReplaceToolTip()); + btnReplace.addSelectHandler(new SelectHandler() { public void onSelect(SelectEvent event) { Log.debug("Pressed Apply"); @@ -190,10 +196,10 @@ public class ReplaceAllPanel extends FramedPanel implements } }); - btnClose = new TextButton("Close"); + btnClose = new TextButton(msgs.btnCloseText()); btnClose.setIcon(ResourceBundle.INSTANCE.close()); btnClose.setIconAlign(IconAlign.RIGHT); - btnClose.setToolTip("Close"); + btnClose.setToolTip(msgs.btnCloseToolTip()); btnClose.addSelectHandler(new SelectHandler() { public void onSelect(SelectEvent event) { @@ -209,18 +215,18 @@ public class ReplaceAllPanel extends FramedPanel implements BoxLayoutData boxLayoutData=new BoxLayoutData(new Margins(2, 4, 2, 4)); - flowButton.add(btnApply, boxLayoutData); + flowButton.add(btnReplace, boxLayoutData); flowButton.add(btnClose, boxLayoutData); VerticalLayoutContainer v = new VerticalLayoutContainer(); if (column.getDataTypeName().compareTo("Date") == 0) { - v.add(new FieldLabel(valueDate, CURRENT_VALUE), new VerticalLayoutData(1, + v.add(new FieldLabel(valueDate, msgs.currentValue()), new VerticalLayoutData(1, -1)); - v.add(new FieldLabel(replaceValueDate, REPLACEMENT), + v.add(new FieldLabel(replaceValueDate, msgs.replacement()), new VerticalLayoutData(1, -1)); } else { - v.add(new FieldLabel(value, CURRENT_VALUE), new VerticalLayoutData(1, -1)); - v.add(new FieldLabel(replaceValue, REPLACEMENT), + v.add(new FieldLabel(value, msgs.currentValue()), new VerticalLayoutData(1, -1)); + v.add(new FieldLabel(replaceValue, msgs.replacement()), new VerticalLayoutData(1, -1)); } v.add(flowButton, new VerticalLayoutData(1, 36, @@ -247,19 +253,19 @@ public class ReplaceAllPanel extends FramedPanel implements addHandlersForComboDimensionType(propsDimensionType.value()); - comboDimensionType.setEmptyText("Select a Value..."); + comboDimensionType.setEmptyText(msgs.selectAValue()); comboDimensionType.setWidth(300); comboDimensionType.setEditable(false); comboDimensionType.setTriggerAction(TriggerAction.ALL); - comboDimensionTypeLabel = new FieldLabel(comboDimensionType, REPLACEMENT); + comboDimensionTypeLabel = new FieldLabel(comboDimensionType, msgs.replacement()); // - btnApply = new TextButton("Replace"); - btnApply.setIcon(ResourceBundle.INSTANCE.replace()); - btnApply.setIconAlign(IconAlign.RIGHT); - btnApply.setToolTip("Replace Value"); - btnApply.addSelectHandler(new SelectHandler() { + btnReplace = new TextButton(msgs.btnReplaceText()); + btnReplace.setIcon(ResourceBundle.INSTANCE.replace()); + btnReplace.setIconAlign(IconAlign.RIGHT); + btnReplace.setToolTip(msgs.btnCloseToolTip()); + btnReplace.addSelectHandler(new SelectHandler() { public void onSelect(SelectEvent event) { Log.debug("Pressed Apply For Dimension"); @@ -268,10 +274,10 @@ public class ReplaceAllPanel extends FramedPanel implements } }); - btnClose = new TextButton("Close"); + btnClose = new TextButton(msgs.btnCloseText()); btnClose.setIcon(ResourceBundle.INSTANCE.close()); btnClose.setIconAlign(IconAlign.RIGHT); - btnClose.setTitle("Close"); + btnClose.setTitle(msgs.btnCloseToolTip()); btnClose.addSelectHandler(new SelectHandler() { public void onSelect(SelectEvent event) { @@ -286,11 +292,11 @@ public class ReplaceAllPanel extends FramedPanel implements flowButton.setPack(BoxLayoutPack.CENTER); BoxLayoutData boxLayoutData=new BoxLayoutData(new Margins(2, 4, 2, 4)); - flowButton.add(btnApply, boxLayoutData); + flowButton.add(btnReplace, boxLayoutData); flowButton.add(btnClose, boxLayoutData); VerticalLayoutContainer v = new VerticalLayoutContainer(); - v.add(new FieldLabel(value, CURRENT_VALUE), new VerticalLayoutData(1, -1)); + v.add(new FieldLabel(value, msgs.currentValue()), new VerticalLayoutData(1, -1)); v.add(comboDimensionTypeLabel, new VerticalLayoutData(1, -1)); v.add(flowButton, new VerticalLayoutData(1, 36, new Margins(5, 2, 5, 2))); @@ -304,7 +310,7 @@ public class ReplaceAllPanel extends FramedPanel implements if (column.getDataTypeName().compareTo("Date") == 0) { Date d = replaceValueDate.getCurrentValue(); if (d == null) { - UtilsGXT3.alert("Attention", "Insert a valid replace value"); + UtilsGXT3.alert(msgsCommon.attention(), msgs.insertAValidReplaceValue()); return; } else { String dateS = sdf.format(d); @@ -314,13 +320,13 @@ public class ReplaceAllPanel extends FramedPanel implements } else { rValue = replaceValue.getCurrentValue(); if (rValue == null) { - UtilsGXT3.alert("Attention", "Insert a valid replace value"); + UtilsGXT3.alert(msgsCommon.attention(), msgs.insertAValidReplaceValue()); return; } else { String checkedValue = checkTypeData(rValue); if (checkedValue == null || checkedValue.isEmpty()) { - UtilsGXT3.alert("Attention", - "Insert a valid replace value for this column"); + UtilsGXT3.alert(msgsCommon.attention(), + msgs.insertAValidReplaceValueForThisColumn()); return; } } @@ -332,7 +338,7 @@ public class ReplaceAllPanel extends FramedPanel implements protected void replaceValueForDimension() { Log.debug("Current Dimension Row in combo: " + dimensionRow); if (dimensionRow == null) { - UtilsGXT3.alert("Attention", "Select a valid value"); + UtilsGXT3.alert(msgsCommon.attention(), msgs.selectAValidValue()); } else { callReplaceValue(dimensionRow.getRowId()); } @@ -422,12 +428,12 @@ public class ReplaceAllPanel extends FramedPanel implements } else { if (caught instanceof TDGWTIsLockedException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Locked", + UtilsGXT3.alert(msgsCommon.errorLocked(), caught.getLocalizedMessage()); } else { if (caught instanceof TDGWTIsFinalException) { Log.error(caught.getLocalizedMessage()); - UtilsGXT3.alert("Error Final", + UtilsGXT3.alert(msgsCommon.errorFinal(), caught.getLocalizedMessage()); } else { Log.error("Error submitting replace column value: " @@ -436,7 +442,7 @@ public class ReplaceAllPanel extends FramedPanel implements + caught.getCause()); caught.printStackTrace(); UtilsGXT3 - .alert("Error submitting replace column value", + .alert(msgsCommon.error(), caught.getMessage()); } } diff --git a/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnMessages.properties b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnMessages.properties index b9f799c..774de51 100644 --- a/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnMessages.properties +++ b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnMessages.properties @@ -2,3 +2,8 @@ dialogHeadingText = Delete Columns deleteBtnText = Delete deleteBtnToolTip = Delete Columns columnsLabel = Columns +errorRetrievingColumnsHead = Error retrieving columns +errorRetrievingColumns = Error retrieving columns on server! +attentionNoColumnSelected = Attention no column selected! +deleteColumnErrorHead = Delete Column Error +deleteColumnError = Error in invocation of delete column operation! diff --git a/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnMessages_es.properties b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnMessages_es.properties index c084023..4191f06 100644 --- a/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnMessages_es.properties +++ b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnMessages_es.properties @@ -2,3 +2,8 @@ dialogHeadingText = Borrar Columnas deleteBtnText = Borrar deleteBtnToolTip = Borrar Columnas columnsLabel = Columnas +errorRetrievingColumnsHead = Error al recuperar las columna +errorRetrievingColumns = Error al recuperar las columnas en el servidor! +attentionNoColumnSelected = Atención ninguna columna seleccionada! +deleteColumnErrorHead = Borrar Columnas Error +deleteColumnError = Error con la invocación de la operación borrar columnas! diff --git a/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnMessages_it.properties b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnMessages_it.properties index ac7c860..a4765ed 100644 --- a/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnMessages_it.properties +++ b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnMessages_it.properties @@ -2,3 +2,8 @@ dialogHeadingText = Elimina Colonne deleteBtnText = Elimina deleteBtnToolTip = Elimina Colonne columnsLabel = Colonne +errorRetrievingColumnsHead = Errore recuperando le colonne +errorRetrievingColumns = Errore recuperando le colonne dal server! +attentionNoColumnSelected = Attenzione nessuna colonna selezionata! +deleteColumnErrorHead = Errore in Delete Column +deleteColumnError = Errore nella invocazione dell''operazione di delete column! diff --git a/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/LabelColumnMessages.properties b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/LabelColumnMessages.properties index a5c9538..d7283c7 100644 --- a/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/LabelColumnMessages.properties +++ b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/LabelColumnMessages.properties @@ -7,3 +7,4 @@ nolabelTextLabel = nolabel insertValidLabels = Insert valid labels! errorChangingTheColumnLabelHead = Error Changing The Column Label errorChangingTheColumnLabel = Error in invocation of Change The Column Label operation! +errorRetrievingColumnsOfTabularResource = Error retrieving columns of tabular resource! diff --git a/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/LabelColumnMessages_es.properties b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/LabelColumnMessages_es.properties index bacfa43..fcec222 100644 --- a/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/LabelColumnMessages_es.properties +++ b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/LabelColumnMessages_es.properties @@ -7,3 +7,4 @@ nolabelTextLabel = noetiqueta insertValidLabels = Introducir etiquetas válidas! errorChangingTheColumnLabelHead = Error en el Cambio de las Etiquetas errorChangingTheColumnLabel = Error en la Operación de Cambio de las Etiquetas! +errorRetrievingColumnsOfTabularResource = Error al recuperar las columnas de la tabular resource! diff --git a/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/LabelColumnMessages_it.properties b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/LabelColumnMessages_it.properties index db1950a..867d956 100644 --- a/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/LabelColumnMessages_it.properties +++ b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/LabelColumnMessages_it.properties @@ -7,3 +7,4 @@ nolabelTextLabel = senzaetichetta insertValidLabels = Inserisci etichette valide! errorChangingTheColumnLabelHead = Errore modificando l''etichette errorChangingTheColumnLabel = Errore nell''invocazione dell''operazione di modifica etichette! +errorRetrievingColumnsOfTabularResource = Errore recuperando le colonne della tabular resource! \ No newline at end of file diff --git a/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingMessages.properties b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingMessages.properties new file mode 100644 index 0000000..7aee47a --- /dev/null +++ b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingMessages.properties @@ -0,0 +1,9 @@ +dialogHead = Column Mapping +btnSaveText = Save +btnSaveToolTip = Save +btnCloseText = Close +btnCloseToolTip = Close +rowsLabel = Select rows +createAValidMapping = Creates a valid mapping! +comboSourceValueEmptyText = Select a source... +comboTargetValueEmptyText = Select a target... diff --git a/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingMessages_es.properties b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingMessages_es.properties new file mode 100644 index 0000000..b937bba --- /dev/null +++ b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingMessages_es.properties @@ -0,0 +1,9 @@ +dialogHead = Columnas Asignación +btnSaveText = Guardar +btnSaveToolTip = Guardar +btnCloseText = Cerrar +btnCloseToolTip = Cerrar +rowsLabel = Seleccionar líneas +createAValidMapping = Crea una asignación válida! +comboSourceValueEmptyText = Seleccionar origen... +comboTargetValueEmptyText = Seleccionar el destino... \ No newline at end of file diff --git a/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingMessages_it.properties b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingMessages_it.properties new file mode 100644 index 0000000..e2e102e --- /dev/null +++ b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/mapping/ColumnMappingMessages_it.properties @@ -0,0 +1,10 @@ +dialogHead = Mappatura Colonne +btnSaveText = Salva +btnSaveToolTip = Salva +btnCloseText = Chiudi +btnCloseToolTip = Chiudi +rowsLabel = Seleziona Righe +createAValidMapping = Crea una mappatura valida! +comboSourceValueEmptyText = Seleziona sorgente... +comboTargetValueEmptyText = Seleziona destinazione... + diff --git a/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllMessages.properties b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllMessages.properties new file mode 100644 index 0000000..5fd72f4 --- /dev/null +++ b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllMessages.properties @@ -0,0 +1,11 @@ +dialogHead = Replace All +btnReplaceText = Replace +btnReplaceToolTip = Replace Value +btnCloseText = Close +btnCloseToolTip = Close +currentValue = Current Value +replacement = Replacement +selectAValue = Select a value... +insertAValidReplaceValue = Insert a valid replace value! +insertAValidReplaceValueForThisColumn = Insert a valid replace value for this column! +selectAValidValue = Select a valid value! diff --git a/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllMessages_es.properties b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllMessages_es.properties new file mode 100644 index 0000000..cc9d4ae --- /dev/null +++ b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllMessages_es.properties @@ -0,0 +1,11 @@ +dialogHead = Reemplazar Todo +btnReplaceText = Reemplaza +btnReplaceToolTip = Reemplaza +btnCloseText = Cerrar +btnCloseToolTip = Cerrar +currentValue = Valor Actual +replacement = Reemplazo +selectAValue = Seleccionar el valor... +insertAValidReplaceValue = Introducir reemplazo válido! +insertAValidReplaceValueForThisColumn = Introducir un valor válido para esta columna! +selectAValidValue = Seleccionar un valor válido! \ No newline at end of file diff --git a/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllMessages_it.properties b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllMessages_it.properties new file mode 100644 index 0000000..f6c661a --- /dev/null +++ b/src/main/resources/org/gcube/portlets/user/td/columnwidget/client/replace/ReplaceAllMessages_it.properties @@ -0,0 +1,12 @@ +dialogHead = Rimpiazza Tutto +btnReplaceText = Rimpiazza +btnReplaceToolTip = Rimpiazza +btnCloseText = Chiudi +btnCloseToolTip = Chiudi +currentValue = Valore Corrente +replacement = Rimpiazzo +selectAValue = Seleziona un valore... +insertAValidReplaceValue = Inserisci un rimpiazzo valido! +insertAValidReplaceValueForThisColumn = Inserisci un valore valido per questa colonna! +selectAValidValue = Seleziona un valore valido! +