Fixed Error Management

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-sdmx-export-widget@101906 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-12-04 17:03:23 +00:00 committed by Giancarlo Panichi
parent ae872d0152
commit 714f1ab84e
3 changed files with 18 additions and 17 deletions

View File

@ -25,7 +25,7 @@ import com.sencha.gxt.widget.core.client.box.AutoProgressMessageBox;
public class SDMXExportWizardTD extends WizardWindow { public class SDMXExportWizardTD extends WizardWindow {
protected SDMXExportSession exportSession; protected SDMXExportSession exportSession;
/** /**
* The id of the {@link CSVTarget} to use. * The id of the {@link CSVTarget} to use.
* *
@ -56,15 +56,16 @@ public class SDMXExportWizardTD extends WizardWindow {
if (caught instanceof TDGWTIsLockedException) { if (caught instanceof TDGWTIsLockedException) {
Log.error(caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
showErrorAndHide("Error Locked", showErrorAndHide("Error Locked",
caught.getLocalizedMessage(), caught); caught.getLocalizedMessage(), "",
caught);
} else { } else {
Log.error("No Tabular Resource Information retrived from server " Log.error("No Tabular Resource Information retrived from server "
+ caught.getLocalizedMessage()); + caught.getLocalizedMessage());
box.hide(); box.hide();
showErrorAndHide("Error", showErrorAndHide(
"Error retrieving tabular resource information: " "Error",
+ caught.getLocalizedMessage(), "Error retrieving tabular resource information: ",
caught); caught.getLocalizedMessage(), caught);
} }
} }
} }

View File

@ -23,6 +23,7 @@ import com.sencha.gxt.core.client.util.Margins;
import com.sencha.gxt.widget.core.client.FramedPanel; 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.BoxLayoutContainer.BoxLayoutData;
import com.sencha.gxt.widget.core.client.container.HtmlLayoutContainer; 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;
import com.sencha.gxt.widget.core.client.container.VBoxLayoutContainer.VBoxLayoutAlign; import com.sencha.gxt.widget.core.client.container.VBoxLayoutContainer.VBoxLayoutAlign;
@ -95,7 +96,7 @@ public class SDMXOperationInProgressCard extends WizardCard implements
operationInProgressPanel.add(resultField, new BoxLayoutData( operationInProgressPanel.add(resultField, new BoxLayoutData(
new Margins(10, 5, 10, 5))); new Margins(10, 5, 10, 5)));
setContent(operationInProgressPanel); setCenterWidget(operationInProgressPanel, new MarginData(0));
resultField.setVisible(false); resultField.setVisible(false);
} }
@ -121,12 +122,12 @@ public class SDMXOperationInProgressCard extends WizardCard implements
if (caught instanceof TDGWTIsLockedException) { if (caught instanceof TDGWTIsLockedException) {
Log.error(caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
showErrorAndHide("Error Locked", showErrorAndHide("Error Locked",
caught.getLocalizedMessage(), caught); caught.getLocalizedMessage(), "",
caught);
} else { } else {
showErrorAndHide("Error in exportSDMX", showErrorAndHide("Error in exportSDMX",
"An error occured in exportSDMX: " "An error occured in exportSDMX.",
+ caught.getLocalizedMessage(), caught.getLocalizedMessage(), caught);
caught);
} }
} }
} }
@ -137,7 +138,6 @@ public class SDMXOperationInProgressCard extends WizardCard implements
public void setup() { public void setup() {
getWizardWindow().setEnableBackButton(false); getWizardWindow().setEnableBackButton(false);
setBackButtonVisible(false); setBackButtonVisible(false);
setNextButtonVisible(false);
getWizardWindow().setEnableNextButton(false); getWizardWindow().setEnableNextButton(false);
getWizardWindow().setNextButtonToFinish(); getWizardWindow().setNextButtonToFinish();
exportSDMX(); exportSDMX();
@ -193,8 +193,7 @@ public class SDMXOperationInProgressCard extends WizardCard implements
new SessionExpiredEvent( new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
showErrorAndHide("Error in SDMX Export", showErrorAndHide("Error in SDMX Export", reason, details, caught);
reason,caught);
} }
forceLayout(); forceLayout();
} }

View File

@ -21,6 +21,7 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.HasValue; import com.google.gwt.user.client.ui.HasValue;
import com.google.gwt.user.client.ui.VerticalPanel; import com.google.gwt.user.client.ui.VerticalPanel;
import com.sencha.gxt.core.client.util.ToggleGroup; import com.sencha.gxt.core.client.util.ToggleGroup;
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;
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData; import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
import com.sencha.gxt.widget.core.client.form.FieldLabel; import com.sencha.gxt.widget.core.client.form.FieldLabel;
@ -132,7 +133,7 @@ public class SDMXRegistrySelectionCard extends WizardCard {
} }
}); });
setContent(registrySelectionPanel); setCenterWidget(registrySelectionPanel, new MarginData(0));
} }
@ -158,8 +159,8 @@ public class SDMXRegistrySelectionCard extends WizardCard {
} else { } else {
Log.error("SDMXRegistrySource do not stored " Log.error("SDMXRegistrySource do not stored "
+ caught.getLocalizedMessage()); + caught.getLocalizedMessage());
showErrorAndHide("Error", "SDMXRegistrySource do not stored " showErrorAndHide("Error", "SDMXRegistrySource do not stored."
+ caught.getLocalizedMessage(), caught); ,caught.getLocalizedMessage(), caught);
} }
} }