Fixed Error Management
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-json-export-widget@101902 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
b3aed58f11
commit
62f2b7b275
|
@ -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;
|
||||||
|
|
||||||
|
@ -79,7 +80,7 @@ public class JSONOperationInProgressCard 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 +104,12 @@ public class JSONOperationInProgressCard 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 export",
|
showErrorAndHide("Error in export",
|
||||||
"An error occured in export: "
|
"An error occured in export. ",
|
||||||
+ caught.getLocalizedMessage(),
|
caught.getLocalizedMessage(), caught);
|
||||||
caught);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,7 +121,6 @@ public class JSONOperationInProgressCard 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();
|
||||||
exportCSV();
|
exportCSV();
|
||||||
|
@ -179,8 +179,7 @@ public class JSONOperationInProgressCard 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();
|
||||||
|
|
|
@ -40,13 +40,13 @@ import com.sencha.gxt.widget.core.client.grid.Grid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author giancarlo
|
* @author giancarlo email: <a
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ColumnDataGridPanel extends ContentPanel implements
|
public class ColumnDataGridPanel extends ContentPanel implements
|
||||||
HasSelectionHandlers<ColumnData> {
|
HasSelectionHandlers<ColumnData> {
|
||||||
//private static final String GRID_WIDTH ="524px";
|
// private static final String GRID_WIDTH ="524px";
|
||||||
private static final String GRID_HEIGHT = "320px";
|
private static final String GRID_HEIGHT = "320px";
|
||||||
protected static final ColumnDataProperties props = GWT
|
protected static final ColumnDataProperties props = GWT
|
||||||
.create(ColumnDataProperties.class);
|
.create(ColumnDataProperties.class);
|
||||||
|
@ -54,13 +54,13 @@ public class ColumnDataGridPanel extends ContentPanel implements
|
||||||
|
|
||||||
protected final Grid<ColumnData> grid;
|
protected final Grid<ColumnData> grid;
|
||||||
private WizardCard parent;
|
private WizardCard parent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param parent
|
* @param parent
|
||||||
*/
|
*/
|
||||||
public ColumnDataGridPanel(WizardCard parent) {
|
public ColumnDataGridPanel(WizardCard parent) {
|
||||||
this.parent=parent;
|
this.parent = parent;
|
||||||
Log.debug("ColumnDataGridPanel");
|
Log.debug("ColumnDataGridPanel");
|
||||||
setHeadingText("Columns");
|
setHeadingText("Columns");
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ public class ColumnDataGridPanel extends ContentPanel implements
|
||||||
grid.setLoader(loader);
|
grid.setLoader(loader);
|
||||||
grid.setSelectionModel(sm);
|
grid.setSelectionModel(sm);
|
||||||
grid.setHeight(GRID_HEIGHT);
|
grid.setHeight(GRID_HEIGHT);
|
||||||
//grid.setWidth(GRID_WIDTH);
|
// grid.setWidth(GRID_WIDTH);
|
||||||
// grid.getView().setAutoExpandColumn(labelCol);
|
// grid.getView().setAutoExpandColumn(labelCol);
|
||||||
grid.getView().setStripeRows(true);
|
grid.getView().setStripeRows(true);
|
||||||
grid.getView().setColumnLines(true);
|
grid.getView().setColumnLines(true);
|
||||||
|
@ -145,11 +145,15 @@ public class ColumnDataGridPanel extends ContentPanel implements
|
||||||
if (caught instanceof TDGWTIsLockedException) {
|
if (caught instanceof TDGWTIsLockedException) {
|
||||||
Log.error(caught.getLocalizedMessage());
|
Log.error(caught.getLocalizedMessage());
|
||||||
parent.showErrorAndHide("Error Locked",
|
parent.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());
|
||||||
|
parent.showErrorAndHide("Error",
|
||||||
|
"No load columns.",
|
||||||
|
caught.getLocalizedMessage(), caught);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
callback.onFailure(caught);
|
callback.onFailure(caught);
|
||||||
|
|
Loading…
Reference in New Issue