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.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;
|
||||
|
||||
|
@ -79,7 +80,7 @@ public class JSONOperationInProgressCard 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 +104,12 @@ public class JSONOperationInProgressCard extends WizardCard implements
|
|||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
showErrorAndHide("Error Locked",
|
||||
caught.getLocalizedMessage(), caught);
|
||||
caught.getLocalizedMessage(), "",
|
||||
caught);
|
||||
} else {
|
||||
showErrorAndHide("Error in export",
|
||||
"An error occured in export: "
|
||||
+ caught.getLocalizedMessage(),
|
||||
caught);
|
||||
"An error occured in export. ",
|
||||
caught.getLocalizedMessage(), caught);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -120,7 +121,6 @@ public class JSONOperationInProgressCard extends WizardCard implements
|
|||
public void setup() {
|
||||
getWizardWindow().setEnableBackButton(false);
|
||||
setBackButtonVisible(false);
|
||||
setNextButtonVisible(false);
|
||||
getWizardWindow().setEnableNextButton(false);
|
||||
getWizardWindow().setNextButtonToFinish();
|
||||
exportCSV();
|
||||
|
@ -179,8 +179,7 @@ public class JSONOperationInProgressCard extends WizardCard implements
|
|||
new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
showErrorAndHide("Error in Export",
|
||||
reason,caught);
|
||||
showErrorAndHide("Error in Export", reason, details, caught);
|
||||
}
|
||||
|
||||
forceLayout();
|
||||
|
|
|
@ -40,13 +40,13 @@ import com.sencha.gxt.widget.core.client.grid.Grid;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class ColumnDataGridPanel extends ContentPanel implements
|
||||
HasSelectionHandlers<ColumnData> {
|
||||
//private static final String GRID_WIDTH ="524px";
|
||||
// private static final String GRID_WIDTH ="524px";
|
||||
private static final String GRID_HEIGHT = "320px";
|
||||
protected static final ColumnDataProperties props = GWT
|
||||
.create(ColumnDataProperties.class);
|
||||
|
@ -54,13 +54,13 @@ public class ColumnDataGridPanel extends ContentPanel implements
|
|||
|
||||
protected final Grid<ColumnData> grid;
|
||||
private WizardCard parent;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parent
|
||||
*/
|
||||
public ColumnDataGridPanel(WizardCard parent) {
|
||||
this.parent=parent;
|
||||
this.parent = parent;
|
||||
Log.debug("ColumnDataGridPanel");
|
||||
setHeadingText("Columns");
|
||||
|
||||
|
@ -110,7 +110,7 @@ public class ColumnDataGridPanel extends ContentPanel implements
|
|||
grid.setLoader(loader);
|
||||
grid.setSelectionModel(sm);
|
||||
grid.setHeight(GRID_HEIGHT);
|
||||
//grid.setWidth(GRID_WIDTH);
|
||||
// grid.setWidth(GRID_WIDTH);
|
||||
// grid.getView().setAutoExpandColumn(labelCol);
|
||||
grid.getView().setStripeRows(true);
|
||||
grid.getView().setColumnLines(true);
|
||||
|
@ -145,11 +145,15 @@ public class ColumnDataGridPanel extends ContentPanel implements
|
|||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
parent.showErrorAndHide("Error Locked",
|
||||
caught.getLocalizedMessage(), caught);
|
||||
caught.getLocalizedMessage(), "",
|
||||
caught);
|
||||
} else {
|
||||
|
||||
Log.error("No load columns: "
|
||||
+ caught.getLocalizedMessage());
|
||||
parent.showErrorAndHide("Error",
|
||||
"No load columns.",
|
||||
caught.getLocalizedMessage(), caught);
|
||||
}
|
||||
}
|
||||
callback.onFailure(caught);
|
||||
|
|
Loading…
Reference in New Issue