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.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;
@ -40,7 +41,8 @@ public class MapWidgetOperationInProgressCard extends WizardCard implements
protected TRId newTrId;
protected HtmlLayoutContainer resultField;
public MapWidgetOperationInProgressCard(final MapCreationSession mapCreationSession) {
public MapWidgetOperationInProgressCard(
final MapCreationSession mapCreationSession) {
super("Operation In Progress", "");
this.mapCreationSession = mapCreationSession;
@ -79,7 +81,7 @@ public class MapWidgetOperationInProgressCard extends WizardCard implements
operationInProgressPanel.add(resultField, new BoxLayoutData(
new Margins(10, 5, 10, 5)));
setContent(operationInProgressPanel);
setCenterWidget(operationInProgressPanel, new MarginData(0));
resultField.setVisible(false);
}
@ -103,12 +105,12 @@ public class MapWidgetOperationInProgressCard extends WizardCard implements
if (caught instanceof TDGWTIsLockedException) {
Log.error(caught.getLocalizedMessage());
showErrorAndHide("Error Locked",
caught.getLocalizedMessage(), caught);
caught.getLocalizedMessage(), "",
caught);
} else {
showErrorAndHide("Error",
"An error occured in map creation: "
+ caught.getLocalizedMessage(),
caught);
"An error occured in map creation.",
caught.getLocalizedMessage(), caught);
}
}
@ -120,7 +122,6 @@ public class MapWidgetOperationInProgressCard extends WizardCard implements
public void setup() {
getWizardWindow().setEnableBackButton(false);
setBackButtonVisible(false);
setNextButtonVisible(false);
getWizardWindow().setEnableNextButton(false);
getWizardWindow().setNextButtonToFinish();
mapCreation();
@ -179,8 +180,7 @@ public class MapWidgetOperationInProgressCard extends WizardCard implements
new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
showErrorAndHide("Error in Export",
reason,caught);
showErrorAndHide("Error in Export", reason, details, caught);
}
forceLayout();

View File

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