Fixed Error Management
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-csv-import-widget@101900 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c0672895c5
commit
03b7238b48
|
@ -33,6 +33,7 @@ import com.sencha.gxt.core.client.util.Padding;
|
|||
import com.sencha.gxt.core.client.util.ToggleGroup;
|
||||
import com.sencha.gxt.data.shared.LabelProvider;
|
||||
import com.sencha.gxt.data.shared.StringLabelProvider;
|
||||
import com.sencha.gxt.widget.core.client.container.MarginData;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||
|
@ -80,8 +81,8 @@ public class CSVConfigCard extends WizardCard {
|
|||
this.csvImportSession = csvImportSession;
|
||||
|
||||
FormPanel panel = createPanel();
|
||||
setContent(panel);
|
||||
|
||||
setCenterWidget(panel,new MarginData(0));
|
||||
|
||||
}
|
||||
|
||||
protected FormPanel createPanel() {
|
||||
|
@ -418,7 +419,7 @@ public class CSVConfigCard extends WizardCard {
|
|||
} else {
|
||||
Log.error("Error loading charset list", caught);
|
||||
showErrorAndHide("Error loading charset list",
|
||||
"Error loading charset list", caught);
|
||||
"Error loading charset list", caught.getLocalizedMessage(), caught);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -22,6 +22,7 @@ import com.sencha.gxt.core.client.util.Margins;
|
|||
import com.sencha.gxt.widget.core.client.FramedPanel;
|
||||
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.container.HtmlLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.MarginData;
|
||||
import com.sencha.gxt.widget.core.client.container.VBoxLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VBoxLayoutContainer.VBoxLayoutAlign;
|
||||
|
||||
|
@ -47,7 +48,8 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
|
||||
VBoxLayoutContainer operationInProgressPanel = new VBoxLayoutContainer();
|
||||
operationInProgressPanel.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER);
|
||||
|
||||
//operationInProgressPanel.setHeight(390);
|
||||
|
||||
final FlexTable description = new FlexTable();
|
||||
// FlexCellFormatter cellFormatter = description.getFlexCellFormatter();
|
||||
description.setCellSpacing(10);
|
||||
|
@ -78,7 +80,7 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
operationInProgressPanel.add(resultField, new BoxLayoutData(
|
||||
new Margins(10, 5, 10, 5)));
|
||||
|
||||
setContent(operationInProgressPanel);
|
||||
setCenterWidget(operationInProgressPanel, new MarginData(0));
|
||||
resultField.setVisible(false);
|
||||
|
||||
}
|
||||
|
@ -101,9 +103,9 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
} else {
|
||||
showErrorAndHide(
|
||||
"Error in importCSV",
|
||||
"An error occured in importCSV: "
|
||||
+ caught.getLocalizedMessage(),
|
||||
caught);
|
||||
"An error occured in importCSV: ",
|
||||
caught.getLocalizedMessage(),
|
||||
caught);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -113,7 +115,6 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
public void setup() {
|
||||
getWizardWindow().setEnableBackButton(false);
|
||||
setBackButtonVisible(false);
|
||||
setNextButtonVisible(false);
|
||||
getWizardWindow().setEnableNextButton(false);
|
||||
getWizardWindow().setNextButtonToFinish();
|
||||
importCSV();
|
||||
|
@ -169,7 +170,7 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
showErrorAndHide("Error in CSV Import", reason,caught);
|
||||
showErrorAndHide("Error in CSV Import", reason,"", caught);
|
||||
}
|
||||
forceLayout();
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
|||
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 org.gcube.portlets.user.td.wizardwidget.client.util.UtilsGXT3;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
|
@ -36,6 +35,7 @@ import com.sencha.gxt.data.shared.loader.ListLoader;
|
|||
import com.sencha.gxt.data.shared.loader.LoadResultListStoreBinding;
|
||||
import com.sencha.gxt.widget.core.client.FramedPanel;
|
||||
import com.sencha.gxt.widget.core.client.box.AlertMessageBox;
|
||||
import com.sencha.gxt.widget.core.client.container.MarginData;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.event.HideEvent;
|
||||
|
@ -96,6 +96,7 @@ public class CSVTableDetailCard extends WizardCard {
|
|||
FieldSet fieldSet = new FieldSet();
|
||||
fieldSet.setHeadingText("Information");
|
||||
fieldSet.setCollapsible(false);
|
||||
|
||||
form.add(fieldSet);
|
||||
|
||||
p = new VerticalLayoutContainer();
|
||||
|
@ -182,7 +183,7 @@ public class CSVTableDetailCard extends WizardCard {
|
|||
|
||||
tableDetailPanel.add(form);
|
||||
|
||||
setContent(tableDetailPanel);
|
||||
setCenterWidget(tableDetailPanel, new MarginData(0));
|
||||
|
||||
}
|
||||
|
||||
|
@ -200,8 +201,8 @@ public class CSVTableDetailCard extends WizardCard {
|
|||
} else {
|
||||
Log.error("load combo failure:"
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
"Error retrieving licences.");
|
||||
showErrorAndHide("Error",
|
||||
"Error retrieving licences.",caught.getLocalizedMessage(),caught);
|
||||
}
|
||||
callback.onFailure(caught);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportSession;
|
|||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.user.client.Command;
|
||||
import com.sencha.gxt.widget.core.client.container.MarginData;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -27,7 +28,7 @@ public class CSVUploadFileCard extends WizardCard {
|
|||
|
||||
this.fileUploadPanel = new FileUploadPanel(res, thisCard,importSession);
|
||||
|
||||
setContent(fileUploadPanel);
|
||||
setCenterWidget(fileUploadPanel, new MarginData(0));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ import org.gcube.portlets.widgets.lighttree.client.event.ItemSelectionHandler;
|
|||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.user.client.Command;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.sencha.gxt.widget.core.client.container.MarginData;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||
|
||||
/**
|
||||
|
@ -81,7 +82,7 @@ public class CSVWorkSpaceSelectionCard extends WizardCard {
|
|||
});
|
||||
p.add(wpanel);
|
||||
wpanel.loadTree();
|
||||
setContent(p);
|
||||
setCenterWidget(p, new MarginData(0));
|
||||
|
||||
}
|
||||
|
||||
|
@ -133,8 +134,8 @@ public class CSVWorkSpaceSelectionCard extends WizardCard {
|
|||
getEventBus().fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
thisCard.showErrorAndHide("Error", "Error retrieving the file from the workspace: "+caught.getLocalizedMessage(),
|
||||
caught);
|
||||
thisCard.showErrorAndHide("Error", "Error retrieving the file from the workspace.",
|
||||
caught.getLocalizedMessage(), caught);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ public class FileUploadPanel extends FormPanel {
|
|||
public void operationFailed(Throwable caught, String reason,
|
||||
String failureDetails) {
|
||||
card.showErrorAndHide("Error uploading the csv file", reason,
|
||||
caught);
|
||||
"", caught);
|
||||
}
|
||||
|
||||
public void operationComplete() {
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
package org.gcube.portlets.user.td.csvimportwidget.client;
|
||||
|
||||
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportSession;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.source.FileSource;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.source.WorkspaceSource;
|
||||
|
@ -16,6 +15,7 @@ import com.google.gwt.user.client.Command;
|
|||
import com.google.gwt.user.client.ui.HasValue;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.sencha.gxt.core.client.util.ToggleGroup;
|
||||
import com.sencha.gxt.widget.core.client.container.MarginData;
|
||||
import com.sencha.gxt.widget.core.client.form.Radio;
|
||||
|
||||
/**
|
||||
|
@ -95,7 +95,7 @@ public class SourceSelectionCard extends WizardCard {
|
|||
}
|
||||
});
|
||||
|
||||
setContent(sourceSelectionPanel);
|
||||
setCenterWidget(sourceSelectionPanel, new MarginData(0));
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue