915: TDM - Support the Spanish language

Task-Url: https://support.d4science.org/issues/915

Updated Spanish Support

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-codelistmapping-import-widget@120147 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-10-30 18:04:39 +00:00
parent 3d506282cb
commit 12d5b9202f
18 changed files with 324 additions and 161 deletions

View File

@ -6,7 +6,7 @@
<Description>tabular-data-codelistmapping-import-widget allows import from url, file and workspace of maps for codelist</Description> <Description>tabular-data-codelistmapping-import-widget allows import from url, file and workspace of maps for codelist</Description>
<Class>PortletsUser</Class> <Class>PortletsUser</Class>
<Name>tabular-data-codelistmapping-import-widget</Name> <Name>tabular-data-codelistmapping-import-widget</Name>
<Version>1.7.0-SNAPSHOT</Version> <Version>1.0.0</Version>
<Packages> <Packages>
<Software> <Software>
<Description>tabular-data-codelistmapping-import-widget allows import from url, file and workspace of maps for codelist</Description> <Description>tabular-data-codelistmapping-import-widget allows import from url, file and workspace of maps for codelist</Description>

View File

@ -1,7 +1,9 @@
The gCube System - tabular-data-codelistmapping-import-widget The gCube System - tabular-data-codelistmapping-import-widget
------------------------------------------------------------ ------------------------------------------------------------
This work has been supported by the following European projects: iMarine (FP7-INFRASTRUCTURES-2011-2) This work has been partially supported by the following European projects: DILIGENT (FP6-2003-IST-2),
D4Science (FP7-INFRA-2007-1.2.2), D4Science-II (FP7-INFRA-2008-1.2.2), iMarine (FP7-INFRASTRUCTURES-2011-2),
and EUBrazilOpenBio (FP7-ICT-2011-EU-Brazil), Parthenos (H2020-INFRADEV-1-2014-1), BlueBridge (H2020-EINFRA-2015-1).
Authors Authors
------- -------

View File

@ -38,8 +38,8 @@
<distroDirectory>${project.basedir}/distro</distroDirectory> <distroDirectory>${project.basedir}/distro</distroDirectory>
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory> <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<release.date>2015-15-10</release.date> <release.date>2015-15-10</release.date>
<wikiurl>https://gcube.wiki.gcube-system.org/gcube/index.php/Tabular_Data_Manager</wikiurl> <wikiurl>http://wiki.gcube-system.org/gcube/Tabular_Data_Manager</wikiurl>
<templatesDirectory>templates</templatesDirectory> <templatesDirectory>templates</templatesDirectory>
<distroDirectory>distro</distroDirectory> <distroDirectory>distro</distroDirectory>
<configDirectory>config</configDirectory> <configDirectory>config</configDirectory>

View File

@ -9,14 +9,14 @@ import com.google.web.bindery.event.shared.EventBus;
/** /**
* *
* @author "Giancarlo Panichi" * @author giancarlo
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* *
*/ */
public class CodelistMappingImportWizardTD extends WizardWindow { public class CodelistMappingImportWizardTD extends WizardWindow {
protected static final int WITHWIZARD=800; private static final int WITHWIZARD=800;
protected static final int HEIGHTWIZARD=520; private static final int HEIGHTWIZARD=520;
private CodelistMappingSession codelistMappingSession;
protected CodelistMappingSession codelistMappingSession;
/** /**
* The id of the {@link CSVTarget} to use. * The id of the {@link CSVTarget} to use.

View File

@ -4,19 +4,30 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.allen_sauer.gwt.log.client.Log; import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.web.bindery.event.shared.SimpleEventBus; import com.google.web.bindery.event.shared.SimpleEventBus;
/** /**
* *
* @author "Giancarlo Panichi" * @author giancarlo
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* *
*/ */
public class CodelistMappingImportWizardTDEntry implements EntryPoint { public class CodelistMappingImportWizardTDEntry implements EntryPoint {
private CodelistMappingMessages msgs;
public void onModuleLoad() { public void onModuleLoad() {
TRId trId=new TRId(); initMessages();
SimpleEventBus eventBus=new SimpleEventBus(); TRId trId = new TRId();
CodelistMappingImportWizardTD importWizard= new CodelistMappingImportWizardTD(trId, "Codelist Mapping Import",eventBus); SimpleEventBus eventBus = new SimpleEventBus();
CodelistMappingImportWizardTD importWizard = new CodelistMappingImportWizardTD(
trId, msgs.codelistMappingImportWizardHead(), eventBus);
Log.info(importWizard.getId()); Log.info(importWizard.getId());
} }
private void initMessages() {
msgs = GWT.create(CodelistMappingMessages.class);
}
} }

View File

@ -0,0 +1,83 @@
package org.gcube.portlets.user.td.codelistmappingimportwidget.client;
import com.google.gwt.i18n.client.Messages;
/**
*
* @author giancarlo email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public interface CodelistMappingMessages extends Messages {
@DefaultMessage("Codelist Mapping Import")
String codelistMappingImportWizardHead();
@DefaultMessage("Codelist Mapping source selection")
String sourceSelectionCardHead();
@DefaultMessage("Codelist Mapping Import File Upload")
String codelistMappingUploadFileCardHead();
@DefaultMessage("Select the Codelist before curation")
String tabResourcesSelectionCardHead();
@DefaultMessage("This tabular resource does not have a valid table!")
String attentionThisTabularResourceDoesNotHaveAValidTable();
@DefaultMessage("Delete")
String delete();
@DefaultMessage("Would you like to delete this tabular resource without table?")
String wouldYouLikeToDeleteThisTabularResourceWithoutTable();
@DefaultMessage("Error on delete TabResource: ")
String errorOnDeleteTabularResourceFixed();
@DefaultMessage("Select The Code Column")
String columnSelectionCardHead();
@DefaultMessage("No columns selected!")
String attentionNoColumnsSelected();
@DefaultMessage("Codelist Mapping Detail")
String codelistMappingDetailCardHead();
@DefaultMessage("Enter a name...")
String fieldNameEmptyText();
@DefaultMessage("Name")
String fieldNameLabel();
@DefaultMessage("Enter a description...")
String fieldDescriptionEmptyText();
@DefaultMessage("Description")
String fieldDescriptionLabel();
@DefaultMessage("XML map")
String fieldDescriptionDefaultValue();
@DefaultMessage("Fill in all fields")
String attentionFillInAllFields();
@DefaultMessage("Document: ")
String documentFixed();
@DefaultMessage("Source: ")
String sourceFixed();
@DefaultMessage("Name: ")
String nameFixed();
@DefaultMessage("Import Summary")
String summaryImport();
@DefaultMessage("An error occured in import codelist mapping: ")
String errorAnErrorOccurredInImportCodelistMappingFixed();
@DefaultMessage("Error in Codelist Mapping Import")
String errorInCodelistMappingImportHead();
}

View File

@ -10,6 +10,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedExcep
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException; import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog; import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog;
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialogListener; 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.SessionExpiredEvent; 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.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.OperationResult; import org.gcube.portlets.user.td.widgetcommonevent.shared.OperationResult;
@ -17,6 +18,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard; import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
import com.allen_sauer.gwt.log.client.Log; import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.GWT;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder; import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.google.gwt.user.client.Command; import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.rpc.AsyncCallback;
@ -36,19 +38,18 @@ import com.sencha.gxt.widget.core.client.container.VBoxLayoutContainer.VBoxLayou
*/ */
public class CodelistMappingOperationInProgressCard extends WizardCard public class CodelistMappingOperationInProgressCard extends WizardCard
implements MonitorDialogListener { implements MonitorDialogListener {
private static CommonMessages msgsCommon= GWT.create(CommonMessages.class);
protected CodelistMappingOperationInProgressCard thisCard; private CodelistMappingMessages msgs;
protected CodelistMappingSession codelistMappingSession; private CodelistMappingSession codelistMappingSession;
protected TRId newTrId; private TRId newTrId;
protected HtmlLayoutContainer resultField; private HtmlLayoutContainer resultField;
public CodelistMappingOperationInProgressCard( public CodelistMappingOperationInProgressCard(
final CodelistMappingSession codelistMappingSession) { final CodelistMappingSession codelistMappingSession) {
super("Operation In Progress", ""); super(msgsCommon.operationInProgress(), "");
this.codelistMappingSession = codelistMappingSession; this.codelistMappingSession = codelistMappingSession;
thisCard = this; initMessages();
VBoxLayoutContainer operationInProgressPanel = new VBoxLayoutContainer(); VBoxLayoutContainer operationInProgressPanel = new VBoxLayoutContainer();
operationInProgressPanel.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER); operationInProgressPanel.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER);
@ -58,19 +59,19 @@ public class CodelistMappingOperationInProgressCard extends WizardCard
description.setBorderWidth(0); description.setBorderWidth(0);
description.setHTML(0, 0, description.setHTML(0, 0,
"<span style=\"font-weight:bold;\";>Document: </span>"); "<span style=\"font-weight:bold;\";>"+msgs.documentFixed()+"</span>");
description.setText(0, 1, "Codelist Mapping"); description.setText(0, 1, "Codelist Mapping");
description.setHTML(1, 0, description.setHTML(1, 0,
"<span style=\"font-weight:bold;\";>Source: </span>"); "<span style=\"font-weight:bold;\";>"+msgs.sourceFixed()+"</span>");
description.setText(1, 1, codelistMappingSession.getSource().getName()); description.setText(1, 1, codelistMappingSession.getSource().getName());
description.setHTML(2, 0, description.setHTML(2, 0,
"<span style=\"font-weight:bold;\";>Name: </span>"); "<span style=\"font-weight:bold;\";>"+msgs.nameFixed()+"</span>");
description.setText(2, 1, codelistMappingSession description.setText(2, 1, codelistMappingSession
.getResourceTDDescriptor().getName()); .getResourceTDDescriptor().getName());
FramedPanel summary = new FramedPanel(); FramedPanel summary = new FramedPanel();
summary.setHeadingText("Import Summary"); summary.setHeadingText(msgs.summaryImport());
summary.setWidth(400); summary.setWidth(400);
summary.add(description); summary.add(description);
operationInProgressPanel.add(summary, new BoxLayoutData(new Margins(20, operationInProgressPanel.add(summary, new BoxLayoutData(new Margins(20,
@ -85,7 +86,12 @@ public class CodelistMappingOperationInProgressCard extends WizardCard
resultField.setVisible(false); resultField.setVisible(false);
} }
protected void initMessages(){
msgs = GWT.create(CodelistMappingMessages.class);
}
public void importCodelistMapping() { public void importCodelistMapping() {
TDGWTServiceAsync.INSTANCE.startCodelistMappingImport( TDGWTServiceAsync.INSTANCE.startCodelistMappingImport(
codelistMappingSession, new AsyncCallback<String>() { codelistMappingSession, new AsyncCallback<String>() {
@ -103,19 +109,19 @@ public class CodelistMappingOperationInProgressCard extends WizardCard
} else { } else {
if (caught instanceof TDGWTIsLockedException) { if (caught instanceof TDGWTIsLockedException) {
Log.error(caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
showErrorAndHide("Error", showErrorAndHide(msgsCommon.errorLocked(),
caught.getLocalizedMessage(), "", caught.getLocalizedMessage(), "",
caught); caught);
} else { } else {
if (caught instanceof TDGWTIsFinalException) { if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
showErrorAndHide("Error", showErrorAndHide(msgsCommon.errorFinal(),
caught.getLocalizedMessage(), "", caught.getLocalizedMessage(), "",
caught); caught);
} else { } else {
showErrorAndHide( showErrorAndHide(
"Error in import codelist mapping", msgsCommon.error(),
"An error occured in import codelist mapping: ", msgs.errorAnErrorOccurredInImportCodelistMappingFixed(),
caught.getLocalizedMessage(), caught.getLocalizedMessage(),
caught); caught);
} }
@ -146,7 +152,7 @@ public class CodelistMappingOperationInProgressCard extends WizardCard
newTrId = operationResult.getTrId(); newTrId = operationResult.getTrId();
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder(); SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
safeHtmlBuilder safeHtmlBuilder
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold; color:#009900;'>Operation Completed</div>"); .appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold; color:#009900;'>"+msgsCommon.operationCompleted()+"</div>");
resultField.setHTML(safeHtmlBuilder.toSafeHtml()); resultField.setHTML(safeHtmlBuilder.toSafeHtml());
resultField.setVisible(true); resultField.setVisible(true);
@ -177,7 +183,7 @@ public class CodelistMappingOperationInProgressCard extends WizardCard
public void operationFailed(Throwable caught, String reason, String details) { public void operationFailed(Throwable caught, String reason, String details) {
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder(); SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
safeHtmlBuilder safeHtmlBuilder
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color:red;'>Operation Failed</div>"); .appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color:red;'>"+msgsCommon.operationFailed()+"</div>");
resultField.setHTML(safeHtmlBuilder.toSafeHtml()); resultField.setHTML(safeHtmlBuilder.toSafeHtml());
resultField.setVisible(true); resultField.setVisible(true);
if (caught instanceof TDGWTSessionExpiredException) { if (caught instanceof TDGWTSessionExpiredException) {
@ -188,15 +194,15 @@ public class CodelistMappingOperationInProgressCard extends WizardCard
} else { } else {
if (caught instanceof TDGWTIsLockedException) { if (caught instanceof TDGWTIsLockedException) {
Log.error(caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
showErrorAndHide("Error Locked", caught.getLocalizedMessage(), showErrorAndHide(msgsCommon.errorLocked(), caught.getLocalizedMessage(),
"", caught); "", caught);
} else { } else {
if (caught instanceof TDGWTIsFinalException) { if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
showErrorAndHide("Error Final", showErrorAndHide(msgsCommon.errorFinal(),
caught.getLocalizedMessage(), "", caught); caught.getLocalizedMessage(), "", caught);
} else { } else {
showErrorAndHide("Error in Codelist Mapping Import", showErrorAndHide(msgs.errorInCodelistMappingImportHead(),
reason, details, caught); reason, details, caught);
} }
} }
@ -210,7 +216,7 @@ public class CodelistMappingOperationInProgressCard extends WizardCard
newTrId = operationResult.getTrId(); newTrId = operationResult.getTrId();
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder(); SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
safeHtmlBuilder safeHtmlBuilder
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color: #FF9900;'>Problems in the Operation</div>"); .appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color: #FF9900;'>"+msgsCommon.operationProblem()+"</div>");
resultField.setHTML(safeHtmlBuilder.toSafeHtml()); resultField.setHTML(safeHtmlBuilder.toSafeHtml());
resultField.setVisible(true); resultField.setVisible(true);
@ -242,7 +248,7 @@ public class CodelistMappingOperationInProgressCard extends WizardCard
public void operationAborted() { public void operationAborted() {
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder(); SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
safeHtmlBuilder safeHtmlBuilder
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color: #AA00AA;'>Operation Aborted</div>"); .appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color: #AA00AA;'>"+msgsCommon.operationAborted()+"</div>");
resultField.setHTML(safeHtmlBuilder.toSafeHtml()); resultField.setHTML(safeHtmlBuilder.toSafeHtml());
resultField.setVisible(true); resultField.setVisible(true);
@ -272,7 +278,7 @@ public class CodelistMappingOperationInProgressCard extends WizardCard
public void operationPutInBackground() { public void operationPutInBackground() {
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder(); SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
safeHtmlBuilder safeHtmlBuilder
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color: #00AAAA;'>Operation in Background</div>"); .appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color: #00AAAA;'>"+msgsCommon.operationInBackground()+"</div>");
resultField.setHTML(safeHtmlBuilder.toSafeHtml()); resultField.setHTML(safeHtmlBuilder.toSafeHtml());
resultField.setVisible(true); resultField.setVisible(true);

View File

@ -5,9 +5,11 @@ package org.gcube.portlets.user.td.codelistmappingimportwidget.client;
import org.gcube.portlets.user.td.gwtservice.shared.codelisthelper.CodelistMappingSession; import org.gcube.portlets.user.td.gwtservice.shared.codelisthelper.CodelistMappingSession;
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.ResourceTDDescriptor; import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.ResourceTDDescriptor;
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard; import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
import com.allen_sauer.gwt.log.client.Log; import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Command; import com.google.gwt.user.client.Command;
import com.sencha.gxt.widget.core.client.FramedPanel; import com.sencha.gxt.widget.core.client.FramedPanel;
import com.sencha.gxt.widget.core.client.box.AlertMessageBox; import com.sencha.gxt.widget.core.client.box.AlertMessageBox;
@ -26,50 +28,58 @@ import com.sencha.gxt.widget.core.client.form.TextField;
* *
*/ */
public class CodelistMappingTableDetailCard extends WizardCard { public class CodelistMappingTableDetailCard extends WizardCard {
private static CodelistMappingMessages msgs = GWT.create(CodelistMappingMessages.class);
private CommonMessages msgsCommon;
private CodelistMappingSession codelistMappingSession;
private CodelistMappingTableDetailCard thisCard;
protected CodelistMappingSession codelistMappingSession; private VerticalLayoutContainer p;
protected CodelistMappingTableDetailCard thisCard;
protected VerticalLayoutContainer p; private TextField fieldName;
private TextArea fieldDescription;
protected TextField name; private ResourceTDDescriptor resourceDetails = new ResourceTDDescriptor();
protected TextArea description;
protected ResourceTDDescriptor resourceDetails = new ResourceTDDescriptor();
public CodelistMappingTableDetailCard( public CodelistMappingTableDetailCard(
final CodelistMappingSession codelistMappingSession) { final CodelistMappingSession codelistMappingSession) {
super("Codelist Mapping Detail", ""); super(msgs.codelistMappingDetailCardHead(), "");
this.codelistMappingSession = codelistMappingSession; this.codelistMappingSession = codelistMappingSession;
thisCard = this; thisCard = this;
initMessages();
FramedPanel form = new FramedPanel(); FramedPanel form = new FramedPanel();
form.setHeaderVisible(false); form.setHeaderVisible(false);
p = new VerticalLayoutContainer(); p = new VerticalLayoutContainer();
form.add(p); form.add(p);
name = new TextField(); fieldName = new TextField();
name.setAllowBlank(false); fieldName.setAllowBlank(false);
name.setEmptyText("Enter a name..."); fieldName.setEmptyText(msgs.fieldNameEmptyText());
if (codelistMappingSession.getLocalFileName() != null if (codelistMappingSession.getLocalFileName() != null
&& !codelistMappingSession.getLocalFileName().isEmpty()) { && !codelistMappingSession.getLocalFileName().isEmpty()) {
name.setValue(codelistMappingSession.getLocalFileName()); fieldName.setValue(codelistMappingSession.getLocalFileName());
} else { } else {
} }
p.add(new FieldLabel(name, "Name"), new VerticalLayoutData(1, -1)); p.add(new FieldLabel(fieldName, msgs.fieldNameLabel()), new VerticalLayoutData(1, -1));
description = new TextArea(); fieldDescription = new TextArea();
description.setAllowBlank(false); fieldDescription.setAllowBlank(false);
description.setEmptyText("Enter a description..."); fieldDescription.setEmptyText(msgs.fieldDescriptionEmptyText());
description.setValue("XML map"); fieldDescription.setValue(msgs.fieldDescriptionDefaultValue());
p.add(new FieldLabel(description, "Description"), p.add(new FieldLabel(fieldDescription, msgs.fieldDescriptionLabel()),
new VerticalLayoutData(1, -1)); new VerticalLayoutData(1, -1));
setContent(form); setContent(form);
} }
protected void initMessages(){
msgsCommon = GWT.create(CommonMessages.class);
}
@Override @Override
public void setup() { public void setup() {
@ -114,15 +124,15 @@ public class CodelistMappingTableDetailCard extends WizardCard {
} }
}; };
if (name.getValue() == null || name.getValue().isEmpty() if (fieldName.getValue() == null || fieldName.getValue().isEmpty()
|| !name.isValid() || description.getValue() == null || !fieldName.isValid() || fieldDescription.getValue() == null
|| description.getValue().isEmpty() || !description.isValid()) { || fieldDescription.getValue().isEmpty() || !fieldDescription.isValid()) {
d = new AlertMessageBox("Attention!", "Fill in all fields"); d = new AlertMessageBox(msgsCommon.attention(), msgs.attentionFillInAllFields());
d.addHideHandler(hideHandler); d.addHideHandler(hideHandler);
d.show(); d.show();
} else { } else {
name.setReadOnly(true); fieldName.setReadOnly(true);
description.setReadOnly(true); fieldDescription.setReadOnly(true);
goNext(); goNext();
} }
} }
@ -130,8 +140,8 @@ public class CodelistMappingTableDetailCard extends WizardCard {
protected void goNext() { protected void goNext() {
Log.debug("goNext()"); Log.debug("goNext()");
try { try {
resourceDetails.setName(name.getCurrentValue()); resourceDetails.setName(fieldName.getCurrentValue());
resourceDetails.setDescription(description.getCurrentValue()); resourceDetails.setDescription(fieldDescription.getCurrentValue());
codelistMappingSession.setResourceTDDescriptor(resourceDetails); codelistMappingSession.setResourceTDDescriptor(resourceDetails);

View File

@ -7,6 +7,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.codelisthelper.CodelistMappi
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard; import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
import com.allen_sauer.gwt.log.client.Log; import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Command; import com.google.gwt.user.client.Command;
/** /**
@ -16,12 +17,13 @@ import com.google.gwt.user.client.Command;
* *
*/ */
public class CodelistMappingUploadFileCard extends WizardCard { public class CodelistMappingUploadFileCard extends WizardCard {
protected CodelistMappingSession codelistMappingSession; private static CodelistMappingMessages msgs = GWT.create(CodelistMappingMessages.class);
protected CodelistMappingFileUploadPanel fileUploadPanel; private CodelistMappingSession codelistMappingSession;
protected CodelistMappingUploadFileCard thisCard; private CodelistMappingFileUploadPanel fileUploadPanel;
private CodelistMappingUploadFileCard thisCard;
public CodelistMappingUploadFileCard(final CodelistMappingSession codelistMappingSession) { public CodelistMappingUploadFileCard(final CodelistMappingSession codelistMappingSession) {
super("Codelist Mapping Import File Upload", ""); super(msgs.codelistMappingUploadFileCardHead(), "");
this.thisCard = this; this.thisCard = this;
this.codelistMappingSession = codelistMappingSession; this.codelistMappingSession = codelistMappingSession;
@ -65,7 +67,12 @@ public class CodelistMappingUploadFileCard extends WizardCard {
}; };
getWizardWindow().setPreviousButtonCommand(sayPreviousCard); getWizardWindow().setPreviousButtonCommand(sayPreviousCard);
getWizardWindow().setEnableNextButton(false); setEnableNextButton(false);
setNextButtonVisible(true);
setEnableBackButton(true);
setBackButtonVisible(true);
} }
} }

View File

@ -120,7 +120,12 @@ public class CodelistMappingUrlSelectionCard extends WizardCard {
}; };
getWizardWindow().setPreviousButtonCommand(sayPreviousCard); getWizardWindow().setPreviousButtonCommand(sayPreviousCard);
getWizardWindow().setEnableNextButton(true);
setEnableNextButton(true);
setNextButtonVisible(true);
setEnableBackButton(true);
setBackButtonVisible(true);
} }
} }

View File

@ -172,7 +172,10 @@ public class CodelistMappingWorkSpaceSelectionCard extends WizardCard {
}; };
getWizardWindow().setPreviousButtonCommand(sayPreviousCard); getWizardWindow().setPreviousButtonCommand(sayPreviousCard);
getWizardWindow().setEnableNextButton(false); setEnableNextButton(false);
setNextButtonVisible(true);
setEnableBackButton(true);
setBackButtonVisible(true);
} }

View File

@ -2,11 +2,13 @@ package org.gcube.portlets.user.td.codelistmappingimportwidget.client;
import org.gcube.portlets.user.td.codelistmappingimportwidget.client.grid.ColumnDataGridPanel; import org.gcube.portlets.user.td.codelistmappingimportwidget.client.grid.ColumnDataGridPanel;
import org.gcube.portlets.user.td.gwtservice.shared.codelisthelper.CodelistMappingSession; import org.gcube.portlets.user.td.gwtservice.shared.codelisthelper.CodelistMappingSession;
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard; import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
import com.allen_sauer.gwt.log.client.Log; import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.event.logical.shared.SelectionEvent; import com.google.gwt.event.logical.shared.SelectionEvent;
import com.google.gwt.event.logical.shared.SelectionHandler; import com.google.gwt.event.logical.shared.SelectionHandler;
import com.google.gwt.user.client.Command; import com.google.gwt.user.client.Command;
@ -24,14 +26,18 @@ import com.sencha.gxt.widget.core.client.form.FormPanel;
* *
*/ */
public class ColumnSelectionCard extends WizardCard { public class ColumnSelectionCard extends WizardCard {
protected ColumnSelectionCard thisCard; private static CodelistMappingMessages msgs = GWT
protected CodelistMappingSession codelistMappingSession; .create(CodelistMappingMessages.class);
protected ColumnDataGridPanel columnsGridPanel; private ColumnSelectionCard thisCard;
private CodelistMappingSession codelistMappingSession;
private ColumnDataGridPanel columnsGridPanel;
private CommonMessages msgsCommon;
public ColumnSelectionCard( public ColumnSelectionCard(
final CodelistMappingSession codelistMappingSession) { final CodelistMappingSession codelistMappingSession) {
super("Select The Code Column", ""); super(msgs.columnSelectionCardHead(), "");
thisCard = this; thisCard = this;
initMessages();
if (codelistMappingSession == null) { if (codelistMappingSession == null) {
Log.error("CodelistMappingSession is null"); Log.error("CodelistMappingSession is null");
} }
@ -41,6 +47,11 @@ public class ColumnSelectionCard extends WizardCard {
setContent(panel); setContent(panel);
} }
protected void initMessages(){
msgsCommon = GWT.create(CommonMessages.class);
}
protected FormPanel createPanel() { protected FormPanel createPanel() {
FormPanel panel = new FormPanel(); FormPanel panel = new FormPanel();
@ -50,21 +61,22 @@ public class ColumnSelectionCard extends WizardCard {
VerticalLayoutContainer content = new VerticalLayoutContainer(); VerticalLayoutContainer content = new VerticalLayoutContainer();
panel.add(content); panel.add(content);
TRId trId=codelistMappingSession.getConnectedTR().getTrId(); TRId trId = codelistMappingSession.getConnectedTR().getTrId();
if(trId==null){ if (trId == null) {
Log.error("CodelistMappingSession has TRId null: "+codelistMappingSession.getConnectedTR()); Log.error("CodelistMappingSession has TRId null: "
+ codelistMappingSession.getConnectedTR());
} }
columnsGridPanel = new ColumnDataGridPanel(this, trId); columnsGridPanel = new ColumnDataGridPanel(this, trId);
columnsGridPanel columnsGridPanel
.addSelectionHandler(new SelectionHandler<ColumnData>() { .addSelectionHandler(new SelectionHandler<ColumnData>() {
public void onSelection(SelectionEvent<ColumnData> event) { public void onSelection(SelectionEvent<ColumnData> event) {
codelistMappingSession codelistMappingSession
.setConnectedColumn(columnsGridPanel .setConnectedColumn(columnsGridPanel
.getSelectedItem()); .getSelectedItem());
getWizardWindow().setEnableNextButton(true); setEnableNextButton(true);
} }
}); });
@ -103,26 +115,25 @@ public class ColumnSelectionCard extends WizardCard {
getWizardWindow().setPreviousButtonCommand(sayPreviousCard); getWizardWindow().setPreviousButtonCommand(sayPreviousCard);
setEnableNextButton(false); setEnableNextButton(false);
setEnableBackButton(true); setEnableBackButton(true);
} }
protected void checkData() { protected void checkData() {
getWizardWindow().setEnableNextButton(false); setEnableNextButton(false);
getWizardWindow().setEnableBackButton(false); setEnableBackButton(false);
AlertMessageBox d; AlertMessageBox d;
HideHandler hideHandler = new HideHandler() { HideHandler hideHandler = new HideHandler() {
public void onHide(HideEvent event) { public void onHide(HideEvent event) {
getWizardWindow().setEnableNextButton(false); setEnableNextButton(false);
getWizardWindow().setEnableBackButton(true); setEnableBackButton(true);
} }
}; };
ColumnData column = codelistMappingSession ColumnData column = codelistMappingSession.getConnectedColumn();
.getConnectedColumn();
if (column == null) { if (column == null) {
d = new AlertMessageBox("Attention", "No columns selected"); d = new AlertMessageBox(msgsCommon.attention(), msgs.attentionNoColumnsSelected());
d.addHideHandler(hideHandler); d.addHideHandler(hideHandler);
d.setModal(false); d.setModal(false);
d.show(); d.show();

View File

@ -8,9 +8,11 @@ import org.gcube.portlets.user.td.gwtservice.shared.source.FileSource;
import org.gcube.portlets.user.td.gwtservice.shared.source.SourceType; import org.gcube.portlets.user.td.gwtservice.shared.source.SourceType;
import org.gcube.portlets.user.td.gwtservice.shared.source.UrlSource; import org.gcube.portlets.user.td.gwtservice.shared.source.UrlSource;
import org.gcube.portlets.user.td.gwtservice.shared.source.WorkspaceSource; import org.gcube.portlets.user.td.gwtservice.shared.source.WorkspaceSource;
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard; import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
import com.allen_sauer.gwt.log.client.Log; import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.event.logical.shared.ValueChangeEvent; import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler; import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.user.client.Command; import com.google.gwt.user.client.Command;
@ -26,17 +28,19 @@ import com.sencha.gxt.widget.core.client.form.Radio;
* *
*/ */
public class SourceSelectionCard extends WizardCard { public class SourceSelectionCard extends WizardCard {
private static final CodelistMappingMessages msgs = GWT
protected final CodelistMappingSession codelistMappingSession; .create(CodelistMappingMessages.class);
private final CodelistMappingSession codelistMappingSession;
final UrlSource urlSource = UrlSource.INSTANCE; private final UrlSource urlSource = UrlSource.INSTANCE;
final FileSource fileSource = FileSource.INSTANCE; private final FileSource fileSource = FileSource.INSTANCE;
final WorkspaceSource workspaceSource = WorkspaceSource.INSTANCE; private final WorkspaceSource workspaceSource = WorkspaceSource.INSTANCE;
private CommonMessages msgsCommon;
public SourceSelectionCard(final CodelistMappingSession codelistMappingSession) { public SourceSelectionCard(final CodelistMappingSession codelistMappingSession) {
super("Codelist Mapping source selection", ""); super(msgs.sourceSelectionCardHead(), "");
this.codelistMappingSession = codelistMappingSession; this.codelistMappingSession = codelistMappingSession;
initMessages();
// Default // Default
codelistMappingSession.setSource(urlSource); codelistMappingSession.setSource(urlSource);
@ -46,7 +50,7 @@ public class SourceSelectionCard extends WizardCard {
Radio radioUrlSource = new Radio(); Radio radioUrlSource = new Radio();
radioUrlSource.setBoxLabel("<p style='display:inline-table;'><b>" radioUrlSource.setBoxLabel("<p style='display:inline-table;'><b>"
+ urlSource.getName() + "</b><br>" + urlSource.getDescription() + msgsCommon.urlSourceName() + "</b><br>" + msgsCommon.urlSourceDescription()
+ "</p>"); + "</p>");
radioUrlSource.setName(urlSource.getName()); radioUrlSource.setName(urlSource.getName());
radioUrlSource.setStylePrimaryName(res.wizardCSS() radioUrlSource.setStylePrimaryName(res.wizardCSS()
@ -55,16 +59,16 @@ public class SourceSelectionCard extends WizardCard {
Radio radioFileSource = new Radio(); Radio radioFileSource = new Radio();
radioFileSource.setBoxLabel("<p style='display:inline-table;'><b>" radioFileSource.setBoxLabel("<p style='display:inline-table;'><b>"
+ fileSource.getName() + "</b><br>" + msgsCommon.fileSourceName() + "</b><br>"
+ fileSource.getDescription() + "</p>"); + msgsCommon.fileSourceDescription() + "</p>");
radioFileSource.setName(fileSource.getName()); radioFileSource.setName(fileSource.getName());
radioFileSource.setStylePrimaryName(res.wizardCSS() radioFileSource.setStylePrimaryName(res.wizardCSS()
.getImportSelectionSource()); .getImportSelectionSource());
Radio radioWorkspaceSource = new Radio(); Radio radioWorkspaceSource = new Radio();
radioWorkspaceSource.setBoxLabel("<p style='display:inline-table;'><b>" radioWorkspaceSource.setBoxLabel("<p style='display:inline-table;'><b>"
+ workspaceSource.getName() + "</b><br>" + msgsCommon.workspaceSourceName() + "</b><br>"
+ workspaceSource.getDescription() + "</p>"); + msgsCommon.workspaceSourceDescription() + "</p>");
radioWorkspaceSource.setName(workspaceSource.getName()); radioWorkspaceSource.setName(workspaceSource.getName());
radioWorkspaceSource.setStylePrimaryName(res.wizardCSS() radioWorkspaceSource.setStylePrimaryName(res.wizardCSS()
.getImportSelectionSource()); .getImportSelectionSource());
@ -116,24 +120,32 @@ public class SourceSelectionCard extends WizardCard {
} }
protected void initMessages(){
msgsCommon = GWT.create(CommonMessages.class);
}
@Override @Override
public void setup() { public void setup() {
Log.debug("Setup Card"); Log.debug("Setup Card");
Command sayNextCard = new Command() { Command sayNextCard = new Command() {
public void execute() { public void execute() {
try { try {
String sourceId = codelistMappingSession.getSource().getId(); String sourceId = codelistMappingSession.getSource()
.getId();
if (sourceId == null || sourceId.isEmpty()) { if (sourceId == null || sourceId.isEmpty()) {
Log.error("Codelist Mapping Import Source Id: " + sourceId); Log.error("Codelist Mapping Import Source Id: "
+ sourceId);
} else { } else {
if (sourceId.compareTo(SourceType.FILE.toString()) == 0) { if (sourceId.compareTo(SourceType.FILE.toString()) == 0) {
Log.info("NextCard CodelistMappingUploadFileCard"); Log.info("NextCard CodelistMappingUploadFileCard");
CodelistMappingUploadFileCard codelistMappingUploadFileCard = new CodelistMappingUploadFileCard( CodelistMappingUploadFileCard codelistMappingUploadFileCard = new CodelistMappingUploadFileCard(
codelistMappingSession); codelistMappingSession);
getWizardWindow().addCard(codelistMappingUploadFileCard); getWizardWindow().addCard(
codelistMappingUploadFileCard);
getWizardWindow().nextCard(); getWizardWindow().nextCard();
} else { } else {
if (sourceId.compareTo(SourceType.WORKSPACE.toString()) == 0) { if (sourceId.compareTo(SourceType.WORKSPACE
.toString()) == 0) {
Log.info("NextCard CSVWorkspaceSelectionCard"); Log.info("NextCard CSVWorkspaceSelectionCard");
CodelistMappingWorkSpaceSelectionCard codelistMappingWorkspaceSelectionCard = new CodelistMappingWorkSpaceSelectionCard( CodelistMappingWorkSpaceSelectionCard codelistMappingWorkspaceSelectionCard = new CodelistMappingWorkSpaceSelectionCard(
codelistMappingSession); codelistMappingSession);
@ -141,7 +153,8 @@ public class SourceSelectionCard extends WizardCard {
codelistMappingWorkspaceSelectionCard); codelistMappingWorkspaceSelectionCard);
getWizardWindow().nextCard(); getWizardWindow().nextCard();
} else { } else {
if (sourceId.compareTo(SourceType.URL.toString()) == 0) { if (sourceId.compareTo(SourceType.URL
.toString()) == 0) {
Log.info("NextCard CodelistMappingURLSelectionCard"); Log.info("NextCard CodelistMappingURLSelectionCard");
CodelistMappingUrlSelectionCard codelistMappingUrlSelectionCard = new CodelistMappingUrlSelectionCard( CodelistMappingUrlSelectionCard codelistMappingUrlSelectionCard = new CodelistMappingUrlSelectionCard(
codelistMappingSession); codelistMappingSession);
@ -161,7 +174,13 @@ public class SourceSelectionCard extends WizardCard {
}; };
getWizardWindow().setNextButtonCommand(sayNextCard); getWizardWindow().setNextButtonCommand(sayNextCard);
setEnableNextButton(true);
setNextButtonVisible(true);
setEnableBackButton(false);
setBackButtonVisible(false);
} }
} }

View File

@ -5,11 +5,13 @@ import org.gcube.portlets.user.td.gwtservice.shared.codelisthelper.CodelistMappi
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException; 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.gwtservice.shared.tr.TabResource;
import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData; import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData;
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.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType; import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard; import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
import com.allen_sauer.gwt.log.client.Log; import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.logical.shared.SelectionEvent; import com.google.gwt.event.logical.shared.SelectionEvent;
import com.google.gwt.event.logical.shared.SelectionHandler; import com.google.gwt.event.logical.shared.SelectionHandler;
import com.google.gwt.user.client.Command; import com.google.gwt.user.client.Command;
@ -24,19 +26,27 @@ import com.sencha.gxt.widget.core.client.event.DialogHideEvent.DialogHideHandler
import com.sencha.gxt.widget.core.client.event.HideEvent; import com.sencha.gxt.widget.core.client.event.HideEvent;
import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler; import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
/**
*
* @author giancarlo
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TabResourcesSelectionCard extends WizardCard { public class TabResourcesSelectionCard extends WizardCard {
protected CodelistMappingSession codelistMappingSession; private static CodelistMappingMessages msgs = GWT
protected TabResourcesSelectionCard thisCard; .create(CodelistMappingMessages.class);
protected TabResourcesSelectionPanel tabResourcesSelectionPanel; private CodelistMappingSession codelistMappingSession;
protected TabResource selectedTabResource = null; private TabResourcesSelectionCard thisCard;
private TabResourcesSelectionPanel tabResourcesSelectionPanel;
private CommonMessages msgsCommon;
public TabResourcesSelectionCard( public TabResourcesSelectionCard(
final CodelistMappingSession codelistMappingSession) { final CodelistMappingSession codelistMappingSession) {
super("Select the Codelist before curation", ""); super(msgs.tabResourcesSelectionCardHead(), "");
Log.debug("TabResourcesSelectionCard"); Log.debug("TabResourcesSelectionCard");
this.codelistMappingSession = codelistMappingSession; this.codelistMappingSession = codelistMappingSession;
thisCard = this; thisCard = this;
tabResourcesSelectionPanel = new TabResourcesSelectionPanel(thisCard, tabResourcesSelectionPanel = new TabResourcesSelectionPanel(thisCard,
res); res);
@ -47,7 +57,7 @@ public class TabResourcesSelectionCard extends WizardCard {
codelistMappingSession codelistMappingSession
.setConnectedTR(tabResourcesSelectionPanel .setConnectedTR(tabResourcesSelectionPanel
.getSelectedItem()); .getSelectedItem());
getWizardWindow().setEnableNextButton(true); setEnableNextButton(true);
} }
}); });
@ -55,6 +65,10 @@ public class TabResourcesSelectionCard extends WizardCard {
setContent(tabResourcesSelectionPanel); setContent(tabResourcesSelectionPanel);
} }
protected void initMessages(){
msgsCommon = GWT.create(CommonMessages.class);
}
@Override @Override
public void setup() { public void setup() {
@ -84,14 +98,14 @@ public class TabResourcesSelectionCard extends WizardCard {
}; };
getWizardWindow().setPreviousButtonCommand(sayPreviousCard); getWizardWindow().setPreviousButtonCommand(sayPreviousCard);
getWizardWindow().setEnableNextButton(false); setEnableNextButton(false);
getWizardWindow().setEnableBackButton(false); setEnableBackButton(false);
} }
protected void retrieveLastTable() { protected void retrieveLastTable() {
getWizardWindow().setEnableNextButton(false); setEnableNextButton(false);
getWizardWindow().setEnableBackButton(false); setEnableBackButton(false);
TDGWTServiceAsync.INSTANCE.getLastTable(codelistMappingSession TDGWTServiceAsync.INSTANCE.getLastTable(codelistMappingSession
.getConnectedTR().getTrId(), new AsyncCallback<TableData>() { .getConnectedTR().getTrId(), new AsyncCallback<TableData>() {
@ -105,8 +119,8 @@ public class TabResourcesSelectionCard extends WizardCard {
} else { } else {
Log.debug("Attention", Log.debug("Attention",
"This tabular resource does not have a valid table"); "This tabular resource does not have a valid table");
AlertMessageBox d = new AlertMessageBox("Attention", AlertMessageBox d = new AlertMessageBox(msgsCommon.attention(),
"This tabular resource does not have a valid table"); msgs.attentionThisTabularResourceDoesNotHaveAValidTable());
d.addHideHandler(new HideHandler() { d.addHideHandler(new HideHandler() {
public void onHide(HideEvent event) { public void onHide(HideEvent event) {
@ -130,41 +144,35 @@ public class TabResourcesSelectionCard extends WizardCard {
} }
protected void deleteTRWithLastTableNull() { protected void deleteTRWithLastTableNull() {
final ConfirmMessageBox mb = new ConfirmMessageBox("Delete", final ConfirmMessageBox mb = new ConfirmMessageBox(msgs.delete(),
"Would you like to delete this tabular resource without table?"); msgs.wouldYouLikeToDeleteThisTabularResourceWithoutTable());
/* GXT 3.0.1 /*
mb.addHideHandler(new HideHandler() { * GXT 3.0.1 mb.addHideHandler(new HideHandler() { public void
public void onHide(HideEvent event) { * onHide(HideEvent event) { if (mb.getHideButton() ==
if (mb.getHideButton() == mb.getButtonById(PredefinedButton.YES * mb.getButtonById(PredefinedButton.YES .name())) {
.name())) { * callDeleteLastTable(); } else if (mb.getHideButton() == mb
callDeleteLastTable(); * .getButtonById(PredefinedButton.NO.name())) {
} else if (mb.getHideButton() == mb * setEnableNextButton(true);
.getButtonById(PredefinedButton.NO.name())) { * setEnableBackButton(true); } } });
getWizardWindow().setEnableNextButton(true); */
getWizardWindow().setEnableBackButton(true);
}
}
});
*/
// Next in GXT 3.1.1 // Next in GXT 3.1.1
mb.addDialogHideHandler(new DialogHideHandler() { mb.addDialogHideHandler(new DialogHideHandler() {
@Override @Override
public void onDialogHide(DialogHideEvent event) { public void onDialogHide(DialogHideEvent event) {
switch (event.getHideButton()) { switch (event.getHideButton()) {
case NO: case NO:
getWizardWindow().setEnableNextButton(true); setEnableNextButton(true);
getWizardWindow().setEnableBackButton(true); setEnableBackButton(true);
break; break;
case YES: case YES:
callDeleteLastTable(); callDeleteLastTable();
break; break;
default: default:
getWizardWindow().setEnableNextButton(true); setEnableNextButton(true);
getWizardWindow().setEnableBackButton(true); setEnableBackButton(true);
break; break;
} }
@ -183,14 +191,14 @@ public class TabResourcesSelectionCard extends WizardCard {
.getConnectedTR().getTrId(), new AsyncCallback<Void>() { .getConnectedTR().getTrId(), new AsyncCallback<Void>() {
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
AlertMessageBox d = new AlertMessageBox("Error", AlertMessageBox d = new AlertMessageBox(msgsCommon.error(),
"Error on delete TabResource: " msgs.errorOnDeleteTabularResourceFixed()
+ caught.getLocalizedMessage()); + caught.getLocalizedMessage());
d.addHideHandler(new HideHandler() { d.addHideHandler(new HideHandler() {
public void onHide(HideEvent event) { public void onHide(HideEvent event) {
getWizardWindow().setEnableNextButton(true); setEnableNextButton(true);
getWizardWindow().setEnableBackButton(true); setEnableBackButton(true);
} }
}); });
@ -200,8 +208,8 @@ public class TabResourcesSelectionCard extends WizardCard {
public void onSuccess(Void result) { public void onSuccess(Void result) {
tabResourcesSelectionPanel.gridReload(); tabResourcesSelectionPanel.gridReload();
getWizardWindow().setEnableNextButton(false); setEnableNextButton(false);
getWizardWindow().setEnableBackButton(true); setEnableBackButton(true);
} }
}); });

View File

@ -1,2 +0,0 @@
sendButton = Send
nameField = Enter your name

View File

@ -1,2 +0,0 @@
sendButton = Envoyer
nameField = Entrez votre nom

View File

@ -1,7 +1,9 @@
The gCube System - ${name} The gCube System - ${name}
------------------------------------------------------------ ------------------------------------------------------------
This work has been supported by the following European projects: iMarine (FP7-INFRASTRUCTURES-2011-2) This work has been partially supported by the following European projects: DILIGENT (FP6-2003-IST-2),
D4Science (FP7-INFRA-2007-1.2.2), D4Science-II (FP7-INFRA-2008-1.2.2), iMarine (FP7-INFRASTRUCTURES-2011-2),
and EUBrazilOpenBio (FP7-ICT-2011-EU-Brazil), Parthenos (H2020-INFRADEV-1-2014-1), BlueBridge (H2020-EINFRA-2015-1).
Authors Authors
------- -------

View File

@ -6,7 +6,7 @@
<Description>${project.description}</Description> <Description>${project.description}</Description>
<Class>PortletsUser</Class> <Class>PortletsUser</Class>
<Name>${project.name}</Name> <Name>${project.name}</Name>
<Version>${version}</Version> <Version>1.0.0</Version>
<Packages> <Packages>
<Software> <Software>
<Description>${project.description}</Description> <Description>${project.description}</Description>