Fixed Error Management

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-map-widget@101903 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-12-04 16:52:19 +00:00 committed by Giancarlo Panichi
parent 20e2f071a0
commit d707f5c683
2 changed files with 13 additions and 11 deletions

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;
@ -40,7 +41,8 @@ public class MapWidgetOperationInProgressCard extends WizardCard implements
protected TRId newTrId; protected TRId newTrId;
protected HtmlLayoutContainer resultField; protected HtmlLayoutContainer resultField;
public MapWidgetOperationInProgressCard(final MapCreationSession mapCreationSession) { public MapWidgetOperationInProgressCard(
final MapCreationSession mapCreationSession) {
super("Operation In Progress", ""); super("Operation In Progress", "");
this.mapCreationSession = mapCreationSession; this.mapCreationSession = mapCreationSession;
@ -79,7 +81,7 @@ public class MapWidgetOperationInProgressCard 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);
} }
@ -103,12 +105,12 @@ public class MapWidgetOperationInProgressCard 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", showErrorAndHide("Error",
"An error occured in map creation: " "An error occured in map creation.",
+ caught.getLocalizedMessage(), caught.getLocalizedMessage(), caught);
caught);
} }
} }
@ -120,7 +122,6 @@ public class MapWidgetOperationInProgressCard 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();
mapCreation(); mapCreation();
@ -179,8 +180,7 @@ public class MapWidgetOperationInProgressCard extends WizardCard implements
new SessionExpiredEvent( new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
showErrorAndHide("Error in Export", showErrorAndHide("Error in Export", reason, details, caught);
reason,caught);
} }
forceLayout(); forceLayout();

View File

@ -73,10 +73,12 @@ public class MapWidgetTD 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 load columns: " Log.error("No load columns: "
+ caught.getLocalizedMessage()); + caught.getLocalizedMessage());
showErrorAndHide("Error","No load columns.",
caught.getLocalizedMessage(), caught);
} }
} }
} }
@ -101,7 +103,7 @@ public class MapWidgetTD extends WizardWindow {
if(!existsGeometryColumn){ if(!existsGeometryColumn){
Log.info("Attention, no Geometry Column present!"); Log.info("Attention, no Geometry Column present!");
showErrorAndHide("Attention", showErrorAndHide("Attention",
"No Geometry Column Present!",new Throwable("No Geometry Column Present!")); "No Geometry Column Present!","", new Throwable("No Geometry Column Present!"));
close(false); close(false);
} else { } else {
if(countGeometryColumns==1){ if(countGeometryColumns==1){