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-csv-export-widget@119944 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
f81e9b8413
commit
4a52a2a4b7
|
@ -6,7 +6,7 @@
|
|||
<Description>tabular-data-csv-export-widget allows csv export inside file and workspace</Description>
|
||||
<Class>PortletsUser</Class>
|
||||
<Name>tabular-data-csv-export-widget</Name>
|
||||
<Version>1.8.0-SNAPSHOT</Version>
|
||||
<Version>1.0.0</Version>
|
||||
<Packages>
|
||||
<Software>
|
||||
<Description>tabular-data-csv-export-widget allows csv export inside file and workspace</Description>
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
The gCube System - tabular-data-csv-export-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
|
||||
-------
|
||||
|
@ -37,7 +39,7 @@ Documentation
|
|||
tabular-data-csv-export-widget allows csv export inside file and workspace
|
||||
|
||||
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
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -38,7 +38,7 @@
|
|||
<distroDirectory>${project.basedir}/distro</distroDirectory>
|
||||
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
|
||||
<release.date>2015-10-15</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>
|
||||
<distroDirectory>distro</distroDirectory>
|
||||
<configDirectory>config</configDirectory>
|
||||
|
|
|
@ -10,6 +10,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.destination.WorkspaceDestina
|
|||
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;
|
||||
|
@ -49,28 +50,31 @@ import com.sencha.gxt.widget.core.client.tips.ToolTipConfig;
|
|||
*
|
||||
*/
|
||||
public class CSVExportConfigCard extends WizardCard {
|
||||
|
||||
private static final int LABEL_WIDTH = 128;
|
||||
private static final int LABEL_PAD_WIDTH = 2;
|
||||
private static final String DEFAULT_DELIMETER = ",";
|
||||
protected CSVExportSession exportSession;
|
||||
private static CSVExportWizardTDMessages msgs = GWT.create(CSVExportWizardTDMessages.class);
|
||||
private CommonMessages msgsCommon;
|
||||
|
||||
private CSVExportSession exportSession;
|
||||
|
||||
private SimpleComboBox<String> encodings;
|
||||
private SimpleComboBox<String> comboEncodings;
|
||||
private TextField customDelimiterField;
|
||||
private Radio otherDelimiter;
|
||||
private Radio commaDelimiter;
|
||||
private Radio spaceDelimiter;
|
||||
private Radio tabDelimiter;
|
||||
private Radio semicoloDelimiter;
|
||||
private Radio radioOtherDelimiter;
|
||||
private Radio radioCommaDelimiter;
|
||||
private Radio radioSpaceDelimiter;
|
||||
private Radio radioTabDelimiter;
|
||||
private Radio radioSemicoloDelimiter;
|
||||
|
||||
private Radio viewColumnExportTrue;
|
||||
private Radio viewColumnExportFalse;
|
||||
private Radio radioViewColumnExportTrue;
|
||||
private Radio radioViewColumnExportFalse;
|
||||
|
||||
protected ColumnDataGridPanel csvColumnGridPanel;
|
||||
|
||||
|
||||
public CSVExportConfigCard(final CSVExportSession exportSession) {
|
||||
super("CSV configuration", "");
|
||||
|
||||
super(msgs.csvExportConfigCardHead(), "");
|
||||
initMessages();
|
||||
if (exportSession == null) {
|
||||
Log.error("CSVExportSession is null");
|
||||
}
|
||||
|
@ -80,6 +84,10 @@ public class CSVExportConfigCard extends WizardCard {
|
|||
setCenterWidget(panel, new MarginData(0));
|
||||
|
||||
}
|
||||
|
||||
protected void initMessages(){
|
||||
msgsCommon = GWT.create(CommonMessages.class);
|
||||
}
|
||||
|
||||
protected FormPanel createPanel() {
|
||||
FormPanel panel = new FormPanel();
|
||||
|
@ -89,21 +97,21 @@ public class CSVExportConfigCard extends WizardCard {
|
|||
VerticalLayoutContainer content = new VerticalLayoutContainer();
|
||||
panel.add(content);
|
||||
|
||||
encodings = new SimpleComboBox<String>(
|
||||
comboEncodings = new SimpleComboBox<String>(
|
||||
new StringLabelProvider<String>());
|
||||
encodings.setToolTip("The CSV file encoding");
|
||||
encodings.setTabIndex(0);
|
||||
encodings.setEditable(false);
|
||||
encodings.setForceSelection(true);
|
||||
encodings.setTriggerAction(TriggerAction.ALL);
|
||||
encodings.addSelectionHandler(new SelectionHandler<String>() {
|
||||
comboEncodings.setToolTip(msgs.comboEncodingsToolTip());
|
||||
comboEncodings.setTabIndex(0);
|
||||
comboEncodings.setEditable(false);
|
||||
comboEncodings.setForceSelection(true);
|
||||
comboEncodings.setTriggerAction(TriggerAction.ALL);
|
||||
comboEncodings.addSelectionHandler(new SelectionHandler<String>() {
|
||||
|
||||
public void onSelection(SelectionEvent<String> event) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
encodings.focus();
|
||||
comboEncodings.focus();
|
||||
|
||||
TDGWTServiceAsync.INSTANCE
|
||||
.getAvailableCharset(new AsyncCallback<AvailableCharsetList>() {
|
||||
|
@ -115,9 +123,9 @@ public class CSVExportConfigCard extends WizardCard {
|
|||
+ result.getDefaultCharset());
|
||||
|
||||
for (String charset : result.getCharsetList())
|
||||
encodings.add(charset);
|
||||
comboEncodings.add(charset);
|
||||
|
||||
encodings.setValue(result.getDefaultCharset());
|
||||
comboEncodings.setValue(result.getDefaultCharset());
|
||||
|
||||
}
|
||||
|
||||
|
@ -133,34 +141,34 @@ public class CSVExportConfigCard extends WizardCard {
|
|||
} else {
|
||||
|
||||
Log.error("Error loading charset list", caught);
|
||||
showErrorAndHide("Error loading charset list",
|
||||
"Error loading charset list:",caught.getLocalizedMessage() , caught);
|
||||
showErrorAndHide(msgs.errorLoadingCharsetListHead(),
|
||||
msgs.errorLoadingCharsetList(),caught.getLocalizedMessage() , caught);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
FieldLabel fieldEncoding=new FieldLabel(encodings, "File encoding");
|
||||
fieldEncoding.setLabelWidth(LABEL_WIDTH);
|
||||
fieldEncoding.setLabelPad(LABEL_PAD_WIDTH);
|
||||
content.add(fieldEncoding);
|
||||
FieldLabel comboEncodingsLabel=new FieldLabel(comboEncodings, msgs.comboEncodingsLabel());
|
||||
comboEncodingsLabel.setLabelWidth(LABEL_WIDTH);
|
||||
comboEncodingsLabel.setLabelPad(LABEL_PAD_WIDTH);
|
||||
content.add(comboEncodingsLabel);
|
||||
|
||||
// Delimiter
|
||||
commaDelimiter = new Radio();
|
||||
commaDelimiter.setBoxLabel("Comma");
|
||||
commaDelimiter.setValue(true);
|
||||
radioCommaDelimiter = new Radio();
|
||||
radioCommaDelimiter.setBoxLabel(msgs.radioCommaDelimiterLabel());
|
||||
radioCommaDelimiter.setValue(true);
|
||||
|
||||
spaceDelimiter = new Radio();
|
||||
spaceDelimiter.setBoxLabel("Space");
|
||||
radioSpaceDelimiter = new Radio();
|
||||
radioSpaceDelimiter.setBoxLabel(msgs.radioSpaceDelimiterLabel());
|
||||
|
||||
tabDelimiter = new Radio();
|
||||
tabDelimiter.setBoxLabel("Tab");
|
||||
radioTabDelimiter = new Radio();
|
||||
radioTabDelimiter.setBoxLabel(msgs.radioTabDelimiterLabel());
|
||||
|
||||
semicoloDelimiter = new Radio();
|
||||
semicoloDelimiter.setBoxLabel("Semicolon");
|
||||
radioSemicoloDelimiter = new Radio();
|
||||
radioSemicoloDelimiter.setBoxLabel(msgs.radioSemicolonDelimiterLabel());
|
||||
|
||||
otherDelimiter = new Radio();
|
||||
otherDelimiter.setBoxLabel("Other delimiter");
|
||||
radioOtherDelimiter = new Radio();
|
||||
radioOtherDelimiter.setBoxLabel(msgs.radioOtherDelimiterLabel());
|
||||
|
||||
customDelimiterField = new TextField();
|
||||
customDelimiterField.setEnabled(false);
|
||||
|
@ -169,11 +177,11 @@ public class CSVExportConfigCard extends WizardCard {
|
|||
customDelimiterField.setWidth(20);
|
||||
|
||||
ToggleGroup delimitersGroup = new ToggleGroup();
|
||||
delimitersGroup.add(commaDelimiter);
|
||||
delimitersGroup.add(spaceDelimiter);
|
||||
delimitersGroup.add(tabDelimiter);
|
||||
delimitersGroup.add(semicoloDelimiter);
|
||||
delimitersGroup.add(otherDelimiter);
|
||||
delimitersGroup.add(radioCommaDelimiter);
|
||||
delimitersGroup.add(radioSpaceDelimiter);
|
||||
delimitersGroup.add(radioTabDelimiter);
|
||||
delimitersGroup.add(radioSemicoloDelimiter);
|
||||
delimitersGroup.add(radioOtherDelimiter);
|
||||
|
||||
delimitersGroup
|
||||
.addValueChangeHandler(new ValueChangeHandler<HasValue<Boolean>>() {
|
||||
|
@ -181,57 +189,57 @@ public class CSVExportConfigCard extends WizardCard {
|
|||
public void onValueChange(
|
||||
ValueChangeEvent<HasValue<Boolean>> event) {
|
||||
|
||||
customDelimiterField.setEnabled(otherDelimiter
|
||||
customDelimiterField.setEnabled(radioOtherDelimiter
|
||||
.getValue());
|
||||
|
||||
if (!otherDelimiter.getValue())
|
||||
if (!radioOtherDelimiter.getValue())
|
||||
customDelimiterField.clearInvalid();
|
||||
else
|
||||
customDelimiterField.validate();
|
||||
|
||||
if (otherDelimiter.getValue()
|
||||
if (radioOtherDelimiter.getValue()
|
||||
&& !customDelimiterField.isValid())
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
HorizontalPanel delimitersPanel = new HorizontalPanel();
|
||||
delimitersPanel.add(commaDelimiter);
|
||||
delimitersPanel.add(spaceDelimiter);
|
||||
delimitersPanel.add(tabDelimiter);
|
||||
delimitersPanel.add(semicoloDelimiter);
|
||||
delimitersPanel.add(otherDelimiter);
|
||||
delimitersPanel.add(radioCommaDelimiter);
|
||||
delimitersPanel.add(radioSpaceDelimiter);
|
||||
delimitersPanel.add(radioTabDelimiter);
|
||||
delimitersPanel.add(radioSemicoloDelimiter);
|
||||
delimitersPanel.add(radioOtherDelimiter);
|
||||
delimitersPanel.add(customDelimiterField);
|
||||
|
||||
new ToolTip(delimitersPanel, new ToolTipConfig(
|
||||
"The delimiter use to delimit the CSV fields"));
|
||||
FieldLabel fieldDelimeter=new FieldLabel(delimitersPanel, "Delimiter");
|
||||
msgs.delimitersPanelToolTip()));
|
||||
FieldLabel fieldDelimeter=new FieldLabel(delimitersPanel, msgs.delimitersPanelLabel());
|
||||
fieldDelimeter.setLabelWidth(LABEL_WIDTH);
|
||||
fieldDelimeter.setLabelPad(LABEL_PAD_WIDTH);
|
||||
content.add(fieldDelimeter);
|
||||
|
||||
// Export View Column
|
||||
viewColumnExportTrue = new Radio();
|
||||
viewColumnExportTrue.setBoxLabel("True");
|
||||
viewColumnExportTrue.setValue(true);
|
||||
radioViewColumnExportTrue = new Radio();
|
||||
radioViewColumnExportTrue.setBoxLabel(msgs.radioViewColumnExportTrueLabel());
|
||||
radioViewColumnExportTrue.setValue(true);
|
||||
|
||||
viewColumnExportFalse = new Radio();
|
||||
viewColumnExportFalse.setBoxLabel("False");
|
||||
radioViewColumnExportFalse = new Radio();
|
||||
radioViewColumnExportFalse.setBoxLabel(msgs.radioViewColumnExportFalseLabel());
|
||||
|
||||
ToggleGroup exportViewColumnGroup = new ToggleGroup();
|
||||
exportViewColumnGroup.add(viewColumnExportTrue);
|
||||
exportViewColumnGroup.add(viewColumnExportFalse);
|
||||
exportViewColumnGroup.add(radioViewColumnExportTrue);
|
||||
exportViewColumnGroup.add(radioViewColumnExportFalse);
|
||||
|
||||
HorizontalPanel viewColumnExportPanel = new HorizontalPanel();
|
||||
viewColumnExportPanel.add(viewColumnExportTrue);
|
||||
viewColumnExportPanel.add(viewColumnExportFalse);
|
||||
viewColumnExportPanel.add(radioViewColumnExportTrue);
|
||||
viewColumnExportPanel.add(radioViewColumnExportFalse);
|
||||
|
||||
new ToolTip(viewColumnExportPanel, new ToolTipConfig(
|
||||
"Export View Columns Too"));
|
||||
FieldLabel fieldViewColumns=new FieldLabel(viewColumnExportPanel, "Export View Columns");
|
||||
fieldViewColumns.setLabelWidth(LABEL_WIDTH);
|
||||
fieldViewColumns.setLabelPad(LABEL_PAD_WIDTH);
|
||||
content.add(fieldViewColumns);
|
||||
msgs.viewColumnExportPanelToolTip()));
|
||||
FieldLabel viewColumnExportPanelLabel=new FieldLabel(viewColumnExportPanel, msgs.viewColumnExportPanelLabel());
|
||||
viewColumnExportPanelLabel.setLabelWidth(LABEL_WIDTH);
|
||||
viewColumnExportPanelLabel.setLabelPad(LABEL_PAD_WIDTH);
|
||||
content.add(viewColumnExportPanelLabel);
|
||||
|
||||
// Column Selection Grid
|
||||
csvColumnGridPanel = new ColumnDataGridPanel(this);
|
||||
|
@ -251,21 +259,21 @@ public class CSVExportConfigCard extends WizardCard {
|
|||
}
|
||||
|
||||
protected char getSelectedDelimiter() {
|
||||
if (otherDelimiter.getValue())
|
||||
if (radioOtherDelimiter.getValue())
|
||||
return customDelimiterField.getValue().charAt(0);
|
||||
if (commaDelimiter.getValue())
|
||||
if (radioCommaDelimiter.getValue())
|
||||
return ',';
|
||||
if (spaceDelimiter.getValue())
|
||||
if (radioSpaceDelimiter.getValue())
|
||||
return ' ';
|
||||
if (tabDelimiter.getValue())
|
||||
if (radioTabDelimiter.getValue())
|
||||
return '\t';
|
||||
if (semicoloDelimiter.getValue())
|
||||
if (radioSemicoloDelimiter.getValue())
|
||||
return ';';
|
||||
return DEFAULT_DELIMETER.charAt(0);
|
||||
}
|
||||
|
||||
protected boolean getExportViewColumns() {
|
||||
if(viewColumnExportTrue.getValue()){
|
||||
if(radioViewColumnExportTrue.getValue()){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -305,13 +313,13 @@ public class CSVExportConfigCard extends WizardCard {
|
|||
|
||||
ArrayList<ColumnData> columns = csvColumnGridPanel.getSelectedItems();
|
||||
if (columns.size() == 0) {
|
||||
d = new AlertMessageBox("Attention", "No columns selected");
|
||||
d = new AlertMessageBox(msgsCommon.attention(), msgs.noColumnSelected());
|
||||
d.addHideHandler(hideHandler);
|
||||
d.setModal(false);
|
||||
d.show();
|
||||
} else {
|
||||
exportSession.setColumns(columns);
|
||||
exportSession.setEncoding(encodings.getCurrentValue());
|
||||
exportSession.setEncoding(comboEncodings.getCurrentValue());
|
||||
exportSession.setSeparator(String.valueOf(getSelectedDelimiter()));
|
||||
exportSession.setExportViewColumns(getExportViewColumns());
|
||||
useWorkspaceDestination();
|
||||
|
@ -345,13 +353,13 @@ public class CSVExportConfigCard extends WizardCard {
|
|||
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
showErrorAndHide("Error Locked",
|
||||
showErrorAndHide(msgsCommon.errorLocked(),
|
||||
caught.getLocalizedMessage(), "",
|
||||
caught);
|
||||
} else {
|
||||
showErrorAndHide(
|
||||
"Error",
|
||||
"Error retrienving tabular resource info: ",
|
||||
msgsCommon.error(),
|
||||
msgs.errorRetrievingTabularResourceInfo(),
|
||||
caught.getLocalizedMessage(), caught);
|
||||
|
||||
}
|
||||
|
|
|
@ -7,6 +7,9 @@ import com.google.web.bindery.event.shared.EventBus;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class CSVExportWizardTD extends WizardWindow {
|
||||
|
||||
|
@ -22,8 +25,7 @@ public class CSVExportWizardTD extends WizardWindow {
|
|||
public CSVExportWizardTD(String title, EventBus eventBus) {
|
||||
super(title, eventBus);
|
||||
setWidth(WIZARDWIDTH);
|
||||
|
||||
|
||||
|
||||
exportSession = new CSVExportSession();
|
||||
|
||||
CSVExportConfigCard csvExportConfigCard = new CSVExportConfigCard(
|
||||
|
|
|
@ -2,14 +2,28 @@ package org.gcube.portlets.user.td.csvexportwidget.client;
|
|||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.gwt.core.shared.GWT;
|
||||
import com.google.web.bindery.event.shared.SimpleEventBus;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class CSVExportWizardTDEntry implements EntryPoint {
|
||||
|
||||
|
||||
|
||||
private CSVExportWizardTDMessages msgs;
|
||||
|
||||
public void onModuleLoad() {
|
||||
initMessage();
|
||||
SimpleEventBus eventBus=new SimpleEventBus();
|
||||
CSVExportWizardTD exportWizard= new CSVExportWizardTD("CSVExport",eventBus);
|
||||
CSVExportWizardTD exportWizard= new CSVExportWizardTD(msgs.csvExportWizardHead(),eventBus);
|
||||
Log.info(exportWizard.getId());
|
||||
}
|
||||
|
||||
protected void initMessage(){
|
||||
msgs = GWT.create(CSVExportWizardTDMessages.class);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
package org.gcube.portlets.user.td.csvexportwidget.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 CSVExportWizardTDMessages extends Messages {
|
||||
|
||||
@DefaultMessage("CSV Export")
|
||||
String csvExportWizardHead();
|
||||
|
||||
@DefaultMessage("CSV configuration")
|
||||
String csvExportConfigCardHead();
|
||||
|
||||
@DefaultMessage("Error loading charset list")
|
||||
String errorLoadingCharsetListHead();
|
||||
|
||||
@DefaultMessage("Error loading charset list:")
|
||||
String errorLoadingCharsetList();
|
||||
|
||||
@DefaultMessage("The CSV file encoding")
|
||||
String comboEncodingsToolTip();
|
||||
|
||||
@DefaultMessage("File encoding")
|
||||
String comboEncodingsLabel();
|
||||
|
||||
@DefaultMessage("The CSV file header")
|
||||
String comboHeaderToolTip();
|
||||
|
||||
@DefaultMessage("Header")
|
||||
String comboHeaderLabel();
|
||||
|
||||
@DefaultMessage("Comma")
|
||||
String radioCommaDelimiterLabel();
|
||||
|
||||
@DefaultMessage("Space")
|
||||
String radioSpaceDelimiterLabel();
|
||||
|
||||
@DefaultMessage("Tab")
|
||||
String radioTabDelimiterLabel();
|
||||
|
||||
@DefaultMessage("Semicolon")
|
||||
String radioSemicolonDelimiterLabel();
|
||||
|
||||
@DefaultMessage("Other delimiter")
|
||||
String radioOtherDelimiterLabel();
|
||||
|
||||
@DefaultMessage("The delimiter use to delimit the CSV fields")
|
||||
String delimitersPanelToolTip();
|
||||
|
||||
@DefaultMessage("Delimiter")
|
||||
String delimitersPanelLabel();
|
||||
|
||||
@DefaultMessage("True")
|
||||
String radioViewColumnExportTrueLabel();
|
||||
|
||||
@DefaultMessage("False")
|
||||
String radioViewColumnExportFalseLabel();
|
||||
|
||||
@DefaultMessage("Export View Columns Too")
|
||||
String viewColumnExportPanelToolTip();
|
||||
|
||||
@DefaultMessage("Export View Columns")
|
||||
String viewColumnExportPanelLabel();
|
||||
|
||||
@DefaultMessage("No column selected")
|
||||
String noColumnSelected();
|
||||
|
||||
@DefaultMessage("Error retrieving tabular resource info:")
|
||||
String errorRetrievingTabularResourceInfo();
|
||||
|
||||
@DefaultMessage("CSV Export in Workspace")
|
||||
String csvWorkspaceSelectionCardHead();
|
||||
|
||||
@DefaultMessage("Name")
|
||||
String nameLabel();
|
||||
|
||||
@DefaultMessage("Description")
|
||||
String descriptionLabel();
|
||||
|
||||
@DefaultMessage("Workspace Selection")
|
||||
String workspaceExplorerHead();
|
||||
|
||||
@DefaultMessage("Folder")
|
||||
String workspaceExplorerPanelLabel();
|
||||
|
||||
@DefaultMessage("No folder selected!")
|
||||
String attentionNoFolderSelected();
|
||||
|
||||
@DefaultMessage("No valid file description!")
|
||||
String attentionNoValidFileDescription();
|
||||
|
||||
@DefaultMessage("No valid file name!")
|
||||
String attentionNoValidFileName();
|
||||
|
||||
@DefaultMessage("CSV destination selection")
|
||||
String destinationSelectionCardHead();
|
||||
|
||||
@DefaultMessage("Download File")
|
||||
String downloadFileCardHead();
|
||||
|
||||
@DefaultMessage("Destination: ")
|
||||
String csvOperationInProgressCardDestinationLabel();
|
||||
|
||||
@DefaultMessage("Name: ")
|
||||
String csvOperationInProgressCardNameLabel();
|
||||
|
||||
@DefaultMessage("Description: ")
|
||||
String csvOperationInProgressCardDescriptionLabel();
|
||||
|
||||
@DefaultMessage("Export Summary")
|
||||
String summaryExport();
|
||||
|
||||
@DefaultMessage("An error occured in exportCSV:")
|
||||
String errorInCSVExport();
|
||||
|
||||
@DefaultMessage("Columns")
|
||||
String columnDataGridPanelHead();
|
||||
|
||||
}
|
|
@ -9,6 +9,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.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.SessionExpiredEvent;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.OperationResult;
|
||||
|
@ -16,6 +17,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
|||
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
|
||||
|
||||
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.user.client.Command;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
|
@ -36,17 +38,16 @@ import com.sencha.gxt.widget.core.client.container.VBoxLayoutContainer.VBoxLayou
|
|||
*/
|
||||
public class CSVOperationInProgressCard extends WizardCard implements
|
||||
MonitorDialogListener {
|
||||
|
||||
protected CSVOperationInProgressCard thisCard;
|
||||
protected CSVExportSession exportSession;
|
||||
protected TRId newTrId;
|
||||
protected HtmlLayoutContainer resultField;
|
||||
private static CommonMessages msgsCommon = GWT.create(CommonMessages.class);
|
||||
private CSVExportWizardTDMessages msgs;
|
||||
private CSVExportSession exportSession;
|
||||
private TRId newTrId;
|
||||
private HtmlLayoutContainer resultField;
|
||||
|
||||
public CSVOperationInProgressCard(final CSVExportSession exportSession) {
|
||||
super("Operation In Progress", "");
|
||||
|
||||
super(msgsCommon.operationInProgress(), "");
|
||||
this.exportSession = exportSession;
|
||||
thisCard = this;
|
||||
initMessages();
|
||||
|
||||
VBoxLayoutContainer operationInProgressPanel = new VBoxLayoutContainer();
|
||||
operationInProgressPanel.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER);
|
||||
|
@ -58,19 +59,31 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
description.setBorderWidth(0);
|
||||
|
||||
// display:block;vertical-align:text-top;
|
||||
description.setHTML(0, 0,
|
||||
"<span style=\"font-weight:bold;\";>Destination: </span>");
|
||||
description.setHTML(
|
||||
0,
|
||||
0,
|
||||
"<span style=\"font-weight:bold;\";>"
|
||||
+ msgs.csvOperationInProgressCardDestinationLabel()
|
||||
+ "</span>");
|
||||
description.setText(0, 1, exportSession.getDestination().getName());
|
||||
description.setHTML(1, 0,
|
||||
"<span style=\"font-weight:bold;\";>File Name: </span>");
|
||||
description.setHTML(
|
||||
1,
|
||||
0,
|
||||
"<span style=\"font-weight:bold;\";>"
|
||||
+ msgs.csvOperationInProgressCardNameLabel()
|
||||
+ "</span>");
|
||||
description.setText(1, 1, exportSession.getFileName());
|
||||
|
||||
description.setHTML(2, 0,
|
||||
"<span style=\"font-weight:bold;\";>File Description: </span>");
|
||||
description.setHTML(
|
||||
2,
|
||||
0,
|
||||
"<span style=\"font-weight:bold;\";>"
|
||||
+ msgs.csvOperationInProgressCardDescriptionLabel()
|
||||
+ "</span>");
|
||||
description.setText(2, 1, exportSession.getFileDescription());
|
||||
|
||||
FramedPanel summary = new FramedPanel();
|
||||
summary.setHeadingText("Export Summary");
|
||||
summary.setHeadingText(msgs.summaryExport());
|
||||
summary.setWidth(400);
|
||||
summary.add(description);
|
||||
operationInProgressPanel.add(summary, new BoxLayoutData(new Margins(20,
|
||||
|
@ -86,6 +99,10 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
|
||||
}
|
||||
|
||||
protected void initMessages() {
|
||||
msgs = GWT.create(CSVExportWizardTDMessages.class);
|
||||
}
|
||||
|
||||
public void exportCSV() {
|
||||
TDGWTServiceAsync.INSTANCE.startCSVExport(exportSession,
|
||||
new AsyncCallback<String>() {
|
||||
|
@ -104,13 +121,13 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
showErrorAndHide("Error Locked",
|
||||
caught.getLocalizedMessage(), "", caught);
|
||||
showErrorAndHide(msgsCommon.errorLocked(),
|
||||
caught.getLocalizedMessage(), "",
|
||||
caught);
|
||||
} else {
|
||||
showErrorAndHide("Error in exportCSV",
|
||||
"An error occured in exportCSV: ",
|
||||
caught.getLocalizedMessage(),
|
||||
caught);
|
||||
showErrorAndHide(msgsCommon.error(),
|
||||
msgs.errorInCSVExport(),
|
||||
caught.getLocalizedMessage(), caught);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -140,7 +157,8 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
newTrId = operationResult.getTrId();
|
||||
SafeHtmlBuilder safeHtmlBuilder = new 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.setVisible(true);
|
||||
|
||||
|
@ -171,7 +189,8 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
public void operationFailed(Throwable caught, String reason, String details) {
|
||||
SafeHtmlBuilder safeHtmlBuilder = new 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.setVisible(true);
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
|
@ -180,19 +199,20 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
showErrorAndHide("Error in CSV Export",
|
||||
reason,details, caught);
|
||||
showErrorAndHide("Error in CSV Export", reason, details, caught);
|
||||
}
|
||||
|
||||
forceLayout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void operationStopped(OperationResult operationResult, String reason, String details) {
|
||||
public void operationStopped(OperationResult operationResult,
|
||||
String reason, String details) {
|
||||
newTrId = operationResult.getTrId();
|
||||
SafeHtmlBuilder safeHtmlBuilder = new 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.validationFailed() + "</div>");
|
||||
resultField.setHTML(safeHtmlBuilder.toSafeHtml());
|
||||
resultField.setVisible(true);
|
||||
|
||||
|
@ -224,7 +244,8 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
public void operationAborted() {
|
||||
SafeHtmlBuilder safeHtmlBuilder = new 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.setVisible(true);
|
||||
|
||||
|
@ -254,7 +275,8 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
public void operationPutInBackground() {
|
||||
SafeHtmlBuilder safeHtmlBuilder = new 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.setVisible(true);
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVExportSession;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
|
||||
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.notification.WorkspaceExplorerSelectNotification.WorskpaceExplorerSelectNotificationListener;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.select.WorkspaceExplorerSelectPanel;
|
||||
|
@ -14,6 +15,7 @@ import org.gcube.portlets.widgets.wsexplorer.shared.Item;
|
|||
import org.gcube.portlets.widgets.wsexplorer.shared.ItemType;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.user.client.Command;
|
||||
import com.sencha.gxt.widget.core.client.FramedPanel;
|
||||
import com.sencha.gxt.widget.core.client.box.AlertMessageBox;
|
||||
|
@ -32,20 +34,23 @@ import com.sencha.gxt.widget.core.client.form.validator.EmptyValidator;
|
|||
*
|
||||
*/
|
||||
public class CSVWorkSpaceSelectionCard extends WizardCard {
|
||||
|
||||
private static CSVExportWizardTDMessages msgs = GWT.create(CSVExportWizardTDMessages.class);
|
||||
private CommonMessages msgsCommon;
|
||||
|
||||
private CSVExportSession exportSession;
|
||||
private CSVWorkSpaceSelectionCard thisCard;
|
||||
private TextField fileName;
|
||||
private TextField fileDescription;
|
||||
|
||||
private VerticalLayoutContainer p;
|
||||
private WorkspaceExplorerSelectPanel wpanel;
|
||||
private WorkspaceExplorerSelectPanel workspaceExplorerPanel;
|
||||
|
||||
public CSVWorkSpaceSelectionCard(final CSVExportSession exportSession) {
|
||||
super("CSV Export in Workspace", "");
|
||||
|
||||
super(msgs.csvWorkspaceSelectionCardHead(), "");
|
||||
this.exportSession = exportSession;
|
||||
thisCard = this;
|
||||
|
||||
initMessages();
|
||||
|
||||
FramedPanel formPanel = new FramedPanel();
|
||||
formPanel.setHeaderVisible(false);
|
||||
|
@ -65,7 +70,7 @@ public class CSVWorkSpaceSelectionCard extends WizardCard {
|
|||
fileName.setAllowBlank(false);
|
||||
fileName.setWidth("410px");
|
||||
fileName.setValue(fileN);
|
||||
p.add(new FieldLabel(fileName, "Name"), new VerticalLayoutData(1,
|
||||
p.add(new FieldLabel(fileName, msgs.nameLabel()), new VerticalLayoutData(1,
|
||||
-1));
|
||||
|
||||
fileDescription = new TextField();
|
||||
|
@ -73,7 +78,7 @@ public class CSVWorkSpaceSelectionCard extends WizardCard {
|
|||
fileDescription.addValidator(new EmptyValidator<String>());
|
||||
fileDescription.setWidth("410px");
|
||||
fileDescription.setValue("csv");
|
||||
p.add(new FieldLabel(fileDescription, "Description"),
|
||||
p.add(new FieldLabel(fileDescription, msgs.descriptionLabel()),
|
||||
new VerticalLayoutData(1, -1));
|
||||
|
||||
|
||||
|
@ -84,8 +89,8 @@ public class CSVWorkSpaceSelectionCard extends WizardCard {
|
|||
List<ItemType> showableTypes = new ArrayList<ItemType>();
|
||||
showableTypes.add(ItemType.FOLDER);
|
||||
|
||||
wpanel = new WorkspaceExplorerSelectPanel(new String(
|
||||
"Workspace Selection"),selectableTypes, showableTypes);
|
||||
workspaceExplorerPanel = new WorkspaceExplorerSelectPanel(new String(
|
||||
msgs.workspaceExplorerHead()),selectableTypes, showableTypes);
|
||||
|
||||
WorskpaceExplorerSelectNotificationListener handler = new WorskpaceExplorerSelectNotificationListener() {
|
||||
|
||||
|
@ -120,16 +125,20 @@ public class CSVWorkSpaceSelectionCard extends WizardCard {
|
|||
}
|
||||
};
|
||||
|
||||
wpanel.addWorkspaceExplorerSelectNotificationListener(handler);
|
||||
workspaceExplorerPanel.addWorkspaceExplorerSelectNotificationListener(handler);
|
||||
|
||||
|
||||
|
||||
///
|
||||
p.add(new FieldLabel(wpanel, "Folder"), new VerticalLayoutData(1, 1));
|
||||
p.add(new FieldLabel(workspaceExplorerPanel, msgs.workspaceExplorerPanelLabel()), new VerticalLayoutData(1, 1));
|
||||
setContent(formPanel);
|
||||
|
||||
}
|
||||
|
||||
protected void initMessages(){
|
||||
msgsCommon = GWT.create(CommonMessages.class);
|
||||
}
|
||||
|
||||
protected void checkExportData() {
|
||||
Log.debug("File Name:" + fileName.getCurrentValue() + " Item id: "
|
||||
+ exportSession.getItemId());
|
||||
|
@ -157,22 +166,22 @@ public class CSVWorkSpaceSelectionCard extends WizardCard {
|
|||
.getCurrentValue());
|
||||
goNext();
|
||||
} else {
|
||||
d = new AlertMessageBox("Attention", "No folder selected");
|
||||
d = new AlertMessageBox(msgsCommon.attention(), msgs.attentionNoFolderSelected());
|
||||
d.addHideHandler(hideHandler);
|
||||
d.setModal(false);
|
||||
d.show();
|
||||
|
||||
}
|
||||
} else {
|
||||
d = new AlertMessageBox("Attention",
|
||||
"No valid file description");
|
||||
d = new AlertMessageBox(msgsCommon.attention(),
|
||||
msgs.attentionNoValidFileDescription());
|
||||
d.addHideHandler(hideHandler);
|
||||
d.setModal(false);
|
||||
d.show();
|
||||
|
||||
}
|
||||
} else {
|
||||
d = new AlertMessageBox("Attention", "No valid file name");
|
||||
d = new AlertMessageBox(msgsCommon.attention(), msgs.attentionNoValidFileName());
|
||||
d.addHideHandler(hideHandler);
|
||||
d.setModal(false);
|
||||
d.show();
|
||||
|
@ -187,7 +196,7 @@ public class CSVWorkSpaceSelectionCard extends WizardCard {
|
|||
|
||||
public void execute() {
|
||||
Log.debug("CSVWorkSpaceSelectionCard Call sayNextCard wpanel:"
|
||||
+ wpanel);
|
||||
+ workspaceExplorerPanel);
|
||||
checkExportData();
|
||||
}
|
||||
|
||||
|
|
|
@ -12,11 +12,13 @@ import org.gcube.portlets.user.td.gwtservice.shared.destination.WorkspaceDestina
|
|||
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.wizardwidget.client.WizardCard;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.event.logical.shared.ValueChangeEvent;
|
||||
import com.google.gwt.event.logical.shared.ValueChangeHandler;
|
||||
import com.google.gwt.user.client.Command;
|
||||
|
@ -33,18 +35,22 @@ import com.sencha.gxt.widget.core.client.form.Radio;
|
|||
*
|
||||
*/
|
||||
public class DestinationSelectionCard extends WizardCard {
|
||||
|
||||
protected final CSVExportSession exportSession;
|
||||
protected DestinationSelectionCard thisCard;
|
||||
private static CSVExportWizardTDMessages msgs = GWT.create(CSVExportWizardTDMessages.class);
|
||||
private CommonMessages msgsCommon;
|
||||
|
||||
final FileDestination fileDestination = FileDestination.INSTANCE;
|
||||
final WorkspaceDestination workspaceDestination = WorkspaceDestination.INSTANCE;
|
||||
private final CSVExportSession exportSession;
|
||||
private DestinationSelectionCard thisCard;
|
||||
|
||||
private final FileDestination fileDestination = FileDestination.INSTANCE;
|
||||
private final WorkspaceDestination workspaceDestination = WorkspaceDestination.INSTANCE;
|
||||
|
||||
public DestinationSelectionCard(final CSVExportSession exportSession) {
|
||||
super("CSV destination selection", "");
|
||||
super(msgs.destinationSelectionCardHead(), "");
|
||||
thisCard=this;
|
||||
this.exportSession = exportSession;
|
||||
|
||||
initMessages();
|
||||
|
||||
// Default
|
||||
exportSession.setDestination(workspaceDestination);
|
||||
|
||||
|
@ -53,6 +59,10 @@ public class DestinationSelectionCard extends WizardCard {
|
|||
|
||||
}
|
||||
|
||||
protected void initMessages(){
|
||||
msgsCommon = GWT.create(CommonMessages.class);
|
||||
}
|
||||
|
||||
protected void create(){
|
||||
VerticalPanel destinationSelectionPanel = new VerticalPanel();
|
||||
destinationSelectionPanel.setStylePrimaryName(res.wizardCSS()
|
||||
|
@ -60,8 +70,8 @@ public class DestinationSelectionCard extends WizardCard {
|
|||
|
||||
Radio radioWorkspaceDestination = new Radio();
|
||||
radioWorkspaceDestination.setBoxLabel("<p style='display:inline-table;'><b>"
|
||||
+ workspaceDestination.getName() + "</b><br>"
|
||||
+ workspaceDestination.getDescription() + "</p>");
|
||||
+ msgsCommon.workspaceDestinationName() + "</b><br>"
|
||||
+ msgsCommon.workspaceDestinationDescription() + "</p>");
|
||||
radioWorkspaceDestination.setName(workspaceDestination.getName());
|
||||
radioWorkspaceDestination.setStylePrimaryName(res.wizardCSS()
|
||||
.getImportSelectionSource());
|
||||
|
@ -70,8 +80,8 @@ public class DestinationSelectionCard extends WizardCard {
|
|||
|
||||
Radio radioFileDestination = new Radio();
|
||||
radioFileDestination.setBoxLabel("<p style='display:inline-table;'><b>"
|
||||
+ fileDestination.getName() + "</b><br>"
|
||||
+ fileDestination.getDescription() + "</p>");
|
||||
+ msgsCommon.fileDestinationName() + "</b><br>"
|
||||
+ msgsCommon.fileDestinationDescription() + "</p>");
|
||||
radioFileDestination.setName(fileDestination.getName());
|
||||
radioFileDestination.setStylePrimaryName(res.wizardCSS()
|
||||
.getImportSelectionSource());
|
||||
|
@ -138,13 +148,13 @@ public class DestinationSelectionCard extends WizardCard {
|
|||
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
showErrorAndHide("Error Locked",
|
||||
showErrorAndHide(msgsCommon.errorLocked(),
|
||||
caught.getLocalizedMessage(), "",
|
||||
caught);
|
||||
} else {
|
||||
showErrorAndHide(
|
||||
"Error",
|
||||
"Error retrienving tabular resource info: ",
|
||||
msgsCommon.error(),
|
||||
msgs.errorRetrievingTabularResourceInfo(),
|
||||
caught.getLocalizedMessage(), caught);
|
||||
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ package org.gcube.portlets.user.td.csvexportwidget.client;
|
|||
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVExportSession;
|
||||
|
||||
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.user.client.Command;
|
||||
|
||||
/**
|
||||
|
@ -18,13 +18,14 @@ import com.google.gwt.user.client.Command;
|
|||
*
|
||||
*/
|
||||
public class DownloadFileCard extends WizardCard {
|
||||
protected CSVExportSession exportSession;
|
||||
protected DownloadFileCard thisCard;
|
||||
|
||||
//private CSVExportSession exportSession;
|
||||
private static CSVExportWizardTDMessages msgs = GWT.create(CSVExportWizardTDMessages.class);
|
||||
private DownloadFileCard thisCard;
|
||||
|
||||
public DownloadFileCard(final CSVExportSession exportSession) {
|
||||
super("Download File", "");
|
||||
super(msgs.downloadFileCardHead(), "");
|
||||
this.thisCard = this;
|
||||
this.exportSession = exportSession;
|
||||
//this.exportSession = exportSession;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -3,9 +3,11 @@ package org.gcube.portlets.user.td.csvexportwidget.client.grid;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.td.csvexportwidget.client.CSVExportWizardTDMessages;
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
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.column.ColumnData;
|
||||
|
@ -38,6 +40,12 @@ import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
|
|||
import com.sencha.gxt.widget.core.client.grid.ColumnModel;
|
||||
import com.sencha.gxt.widget.core.client.grid.Grid;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class ColumnDataGridPanel extends ContentPanel implements
|
||||
HasSelectionHandlers<ColumnData> {
|
||||
//private static final String GRID_WIDTH ="524px";
|
||||
|
@ -45,15 +53,19 @@ public class ColumnDataGridPanel extends ContentPanel implements
|
|||
private static final ColumnDataProperties props = GWT
|
||||
.create(ColumnDataProperties.class);
|
||||
private final CheckBoxSelectionModel<ColumnData> sm;
|
||||
|
||||
private final Grid<ColumnData> grid;
|
||||
|
||||
private CommonMessages msgsCommon;
|
||||
private CSVExportWizardTDMessages msgs;
|
||||
|
||||
private WizardCard parent;
|
||||
|
||||
|
||||
public ColumnDataGridPanel(WizardCard parent) {
|
||||
this.parent=parent;
|
||||
Log.debug("ColumnDataGridPanel");
|
||||
setHeadingText("Columns");
|
||||
initMessages();
|
||||
setHeadingText(msgs.columnDataGridPanelHead());
|
||||
|
||||
ColumnConfig<ColumnData, String> labelCol = new ColumnConfig<ColumnData, String>(
|
||||
props.label());
|
||||
|
@ -116,7 +128,12 @@ public class ColumnDataGridPanel extends ContentPanel implements
|
|||
setWidget(con);
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void initMessages(){
|
||||
msgsCommon = GWT.create(CommonMessages.class);
|
||||
msgs = GWT.create(CSVExportWizardTDMessages.class);
|
||||
}
|
||||
|
||||
public Grid<ColumnData> getGrid() {
|
||||
return grid;
|
||||
}
|
||||
|
@ -135,7 +152,7 @@ public class ColumnDataGridPanel extends ContentPanel implements
|
|||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
parent.showErrorAndHide("Error Locked",
|
||||
parent.showErrorAndHide(msgsCommon.errorLocked(),
|
||||
caught.getLocalizedMessage(), "", caught);
|
||||
} else {
|
||||
|
||||
|
|
|
@ -6,7 +6,13 @@ import com.google.gwt.editor.client.Editor.Path;
|
|||
import com.sencha.gxt.core.client.ValueProvider;
|
||||
import com.sencha.gxt.data.shared.ModelKeyProvider;
|
||||
import com.sencha.gxt.data.shared.PropertyAccess;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public interface ColumnDataProperties extends
|
||||
PropertyAccess<ColumnData> {
|
||||
|
||||
|
|
|
@ -1,34 +1,63 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module rename-to='CSVExportWizardTD'>
|
||||
<!-- Inherit the core Web Toolkit stuff. -->
|
||||
<inherits name='com.google.gwt.user.User' />
|
||||
<!-- Inherit the core Web Toolkit stuff. -->
|
||||
<inherits name='com.google.gwt.user.User' />
|
||||
<!-- <inherits name="com.google.gwt.i18n.I18N" /> -->
|
||||
|
||||
<!-- We need the JUnit module in the main module, -->
|
||||
<!-- otherwise eclipse complains (Google plugin bug?) -->
|
||||
<inherits name='com.google.gwt.junit.JUnit' />
|
||||
<!-- We need the JUnit module in the main module, -->
|
||||
<!-- otherwise eclipse complains (Google plugin bug?) -->
|
||||
<inherits name='com.google.gwt.junit.JUnit' />
|
||||
|
||||
<!-- Inherit the default GWT style sheet. You can change -->
|
||||
<!-- the theme of your GWT application by uncommenting -->
|
||||
<!-- any one of the following lines. -->
|
||||
<inherits name='com.google.gwt.user.theme.standard.Standard' />
|
||||
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
|
||||
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
|
||||
<!-- Other module inherits -->
|
||||
<inherits name='com.sencha.gxt.ui.GXT' />
|
||||
|
||||
<!-- Other module inherits -->
|
||||
<inherits name='com.sencha.gxt.ui.GXT' />
|
||||
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
|
||||
<inherits name='org.gcube.portlets.user.td.gwtservice.TDGWTService' />
|
||||
<inherits name='org.gcube.portlets.user.td.wizardwidget.Wizard' />
|
||||
<inherits name='org.gcube.portlets.user.td.monitorwidget.MonitorWidgetTD' />
|
||||
|
||||
<inherits name='org.gcube.portlets.widgets.wsexplorer.WorkspaceExplorer' />
|
||||
|
||||
<!-- Specify the app entry point class. -->
|
||||
<!-- <entry-point class='org.gcube.portlets.user.SDMXImportWizardTD.client.SDMXImportWizardTDEntry' /> -->
|
||||
<!-- GXT Theme -->
|
||||
<!-- <inherits name='com.sencha.gxt.theme.blue.Blue' /> -->
|
||||
<!-- <inherits name='com.sencha.gxt.theme.gray.Gray' /> -->
|
||||
<!-- Be sure to include Neptunes gxt-theme-neptune.jar in the classpath -->
|
||||
<!-- <inherits name='com.sencha.gxt.theme.neptune.Theme' /> -->
|
||||
|
||||
|
||||
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
|
||||
|
||||
<inherits name='org.gcube.portlets.user.td.gwtservice.TDGWTService' />
|
||||
<inherits name='org.gcube.portlets.user.td.wizardwidget.Wizard' />
|
||||
<inherits name='org.gcube.portlets.user.td.monitorwidget.MonitorWidgetTD' />
|
||||
|
||||
<inherits name='org.gcube.portlets.widgets.wsexplorer.WorkspaceExplorer' />
|
||||
|
||||
<!-- Specify the app entry point class. -->
|
||||
<!-- <entry-point class='org.gcube.portlets.user.SDMXImportWizardTD.client.SDMXImportWizardTDEntry'
|
||||
/> -->
|
||||
|
||||
<!-- <set-configuration-property name="locale.cookie" value="TDLangCookie"
|
||||
/> <set-configuration-property name="locale.queryparam" value="TDLang" />
|
||||
<set-configuration-property name="locale.usemeta" value="Y" /> <set-configuration-property
|
||||
name="locale.useragent" value="Y" /> <set-configuration-property name="locale.searchorder"
|
||||
value="cookie,queryparam,meta,useragent" /> <extend-property name="locale"
|
||||
values="en" /> <extend-property name="locale" values="it" /> <extend-property
|
||||
name="locale" values="es" /> <set-property name="locale" value="en, it, es"
|
||||
/> <set-property-fallback name="locale" value="en" /> -->
|
||||
|
||||
|
||||
<!-- <set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property
|
||||
name="log_DivLogger" value="ENABLED" /> <set-property name="log_GWTLogger"
|
||||
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"
|
||||
/> -->
|
||||
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="ENABLED"
|
||||
/> -->
|
||||
|
||||
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
||||
<set-property name="log_DivLogger" value="DISABLED" />
|
||||
<set-property name="log_GWTLogger" value="DISABLED" />
|
||||
<set-property name="log_SystemLogger" value="DISABLED" />
|
||||
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="DISABLED"
|
||||
/> -->
|
||||
|
||||
|
||||
<!-- Specify the paths for translatable code -->
|
||||
<source path='client' />
|
||||
<source path='shared' />
|
||||
<!-- <source path='org.gcube.data.analysis.tabulardata.operation.worker'/> -->
|
||||
|
||||
<!-- Specify the paths for translatable code -->
|
||||
<source path='client' />
|
||||
<source path='shared' />
|
||||
<!-- <source path='org.gcube.data.analysis.tabulardata.operation.worker'/> -->
|
||||
|
||||
</module>
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
csvExportWizardHead = CSV Export
|
||||
csvExportConfigCardHead = CSV configuration
|
||||
errorLoadingCharsetListHead = Error loading charset list
|
||||
errorLoadingCharsetList = Error loading charset list:
|
||||
comboEncodingsToolTip = The CSV file encoding
|
||||
comboEncodingsLabel = File encoding
|
||||
comboHeaderToolTip = The CSV file header
|
||||
comboHeaderLabel = Header
|
||||
radioCommaDelimiterLabel = Comma
|
||||
radioSpaceDelimiterLabel = Space
|
||||
radioTabDelimiterLabel = Tab
|
||||
radioSemicolonDelimiterLabel = Semicolon
|
||||
radioOtherDelimiterLabel = Other delimiter
|
||||
delimitersPanelToolTip = The delimiter use to delimit the CSV fields
|
||||
delimitersPanelLabel = Delimiter
|
||||
radioViewColumnExportTrueLabel = True
|
||||
radioViewColumnExportFalseLabel = False
|
||||
viewColumnExportPanelToolTip = Export View Columns Too
|
||||
viewColumnExportPanelLabel = Export View Columns
|
||||
noColumnSelected = No column selected
|
||||
errorRetrievingTabularResourceInfo = Error retrieving tabular resource info:
|
||||
csvWorkspaceSelectionCardHead = CSV Export in Workspace
|
||||
nameLabel = Name
|
||||
descriptionLabel = Description
|
||||
workspaceExplorerHead = Workspace Selection
|
||||
workspaceExplorerPanelLabel = Folder
|
||||
attentionNoFolderSelected = No folder selected!
|
||||
attentionNoValidFileDescription = No valid file description!
|
||||
attentionNoValidFileName = No valid file name!
|
||||
destinationSelectionCardHead = CSV destination selection
|
||||
downloadFileCardHead = Download File
|
||||
csvOperationInProgressCardDestinationLabel = Destination:
|
||||
csvOperationInProgressCardNameLabel = Name:
|
||||
csvOperationInProgressCardDescriptionLabel = Description:
|
||||
summaryExport = Export Summary
|
||||
errorInCSVExport = An error occured in exportCSV:
|
||||
columnDataGridPanelHead = Columns
|
|
@ -0,0 +1,37 @@
|
|||
csvExportWizardHead = Exportación CSV
|
||||
csvExportConfigCardHead = Configuración CSV
|
||||
errorLoadingCharsetListHead = Error al cargar la lista de formatos de caracteres
|
||||
errorLoadingCharsetList = Error al cargar la lista de formatos de caracteres:
|
||||
comboEncodingsToolTip = CSV archivo codificación
|
||||
comboEncodingsLabel = Codificación
|
||||
comboHeaderToolTip = CSV archivo encabezamiento
|
||||
comboHeaderLabel = Encabezamiento
|
||||
radioCommaDelimiterLabel = Coma
|
||||
radioSpaceDelimiterLabel = Space
|
||||
radioTabDelimiterLabel = Tab
|
||||
radioSemicolonDelimiterLabel = Punto y Coma
|
||||
radioOtherDelimiterLabel = Otro
|
||||
delimitersPanelToolTip = El delimitador utilizado para delimitar campos CSV
|
||||
delimitersPanelLabel = Delimitator
|
||||
radioViewColumnExportTrueLabel = Real
|
||||
radioViewColumnExportFalseLabel = Falso
|
||||
viewColumnExportPanelToolTip = También exporta View Column
|
||||
viewColumnExportPanelLabel = Exporta View Columns
|
||||
noColumnSelected = No columna seleccionada
|
||||
errorRetrievingTabularResourceInfo = Error al recuperar info en la tabular resource:
|
||||
csvWorkspaceSelectionCardHead = Exporta CSV desde Workspace
|
||||
nameLabel = Nombre
|
||||
descriptionLabel = Descripción
|
||||
workspaceExplorerHead = Workspace Seleccione
|
||||
workspaceExplorerPanelLabel = Folder
|
||||
attentionNoFolderSelected = No folder seleccionado!
|
||||
attentionNoValidFileDescription = No hay una descripción válida!
|
||||
attentionNoValidFileName = No hay un nombre válido!
|
||||
destinationSelectionCardHead = Seleccione el destino para el CSV
|
||||
downloadFileCardHead = Descarga Archivo
|
||||
csvOperationInProgressCardDestinationLabel = Destino:
|
||||
csvOperationInProgressCardNameLabel = Nombre:
|
||||
csvOperationInProgressCardDescriptionLabel = Descripción:
|
||||
summaryExport = Resumen de la Exportacione
|
||||
errorInCSVExport = Se produjo un error en la exportación de CSV:
|
||||
columnDataGridPanelHead = Columnas
|
|
@ -0,0 +1,37 @@
|
|||
csvExportWizardHead = Esporta CSV
|
||||
csvExportConfigCardHead = Configurazione CSV
|
||||
errorLoadingCharsetListHead = Errore caricando la lista dei formati dei caratteri
|
||||
errorLoadingCharsetList = Errore caricando la lista dei formati dei caratteri:
|
||||
comboEncodingsToolTip = CSV file codifica
|
||||
comboEncodingsLabel = File codifica
|
||||
comboHeaderToolTip = CSV file intestazione
|
||||
comboHeaderLabel = Intestazione
|
||||
radioCommaDelimiterLabel = Virgola
|
||||
radioSpaceDelimiterLabel = Spazio
|
||||
radioTabDelimiterLabel = Tab
|
||||
radioSemicolonDelimiterLabel = Punto e Virgola
|
||||
radioOtherDelimiterLabel = Altro
|
||||
delimitersPanelToolTip = Il delimitatore usato per delimitare i campi nel CSV
|
||||
delimitersPanelLabel = Delimitatore
|
||||
radioViewColumnExportTrueLabel = Vero
|
||||
radioViewColumnExportFalseLabel = Falso
|
||||
viewColumnExportPanelToolTip = Esporta anche le View Column
|
||||
viewColumnExportPanelLabel = Esporta View Columns
|
||||
noColumnSelected = Nessuna colonna selezionata
|
||||
errorRetrievingTabularResourceInfo = Errore recuperando le info sulla tabular resource:
|
||||
csvWorkspaceSelectionCardHead = Esporta CSV in Workspace
|
||||
nameLabel = Nome
|
||||
descriptionLabel = Descrizione
|
||||
workspaceExplorerHead = Workspace Seleziona
|
||||
workspaceExplorerPanelLabel = Folder
|
||||
attentionNoFolderSelected = Nessun folder selezionato!
|
||||
attentionNoValidFileDescription = Descrizione non valida!
|
||||
attentionNoValidFileName = Nome non valido!
|
||||
destinationSelectionCardHead = Seleziona destinazione per il CSV
|
||||
downloadFileCardHead = Scarica File
|
||||
csvOperationInProgressCardDestinationLabel = Destinazione:
|
||||
csvOperationInProgressCardNameLabel = Nome:
|
||||
csvOperationInProgressCardDescriptionLabel = Descrizione:
|
||||
summaryExport = Sommario Esportazione
|
||||
errorInCSVExport = Un errore è avvenuto nell''esportazione del CSV:
|
||||
columnDataGridPanelHead = Colonne
|
|
@ -1,2 +0,0 @@
|
|||
sendButton = Send
|
||||
nameField = Enter your name
|
|
@ -1,2 +0,0 @@
|
|||
sendButton = Envoyer
|
||||
nameField = Entrez votre nom
|
|
@ -1,7 +1,9 @@
|
|||
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
|
||||
-------
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<Description>${project.description}</Description>
|
||||
<Class>PortletsUser</Class>
|
||||
<Name>${project.name}</Name>
|
||||
<Version>${version}</Version>
|
||||
<Version>1.0.0</Version>
|
||||
<Packages>
|
||||
<Software>
|
||||
<Description>${project.description}</Description>
|
||||
|
|
Loading…
Reference in New Issue