Fixed Final and Lock error
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-table-widget@100286 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
94d4482581
commit
74ad4e36fd
|
@ -1,6 +1,8 @@
|
|||
package org.gcube.portlets.user.td.tablewidget.client;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.ChangeTableTypeSession;
|
||||
|
@ -142,11 +144,23 @@ public class ChangeTableTypePanel extends FramedPanel implements
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.debug("Change The Table Type Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3
|
||||
.alert("Error Changing The Table Type",
|
||||
"Error in invocation of Change Table Type operation!");
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.debug("Change The Table Type Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3
|
||||
.alert("Error Changing The Table Type",
|
||||
"Error in invocation of Change Table Type operation!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -175,10 +189,16 @@ public class ChangeTableTypePanel extends FramedPanel implements
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.error("Error retrieving table: "
|
||||
+ caught.getMessage());
|
||||
UtilsGXT3.alert("Error retrieving table",
|
||||
caught.getMessage());
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrieving table: "
|
||||
+ caught.getMessage());
|
||||
UtilsGXT3.alert("Error retrieving table",
|
||||
caught.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.gcube.portlets.user.td.tablewidget.client;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.clone.CloneTabularResourceSession;
|
||||
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog;
|
||||
|
@ -43,10 +44,17 @@ public class CloneTabularResource implements MonitorDialogListener {
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.debug("Clone Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Cloning Tabular Resource",
|
||||
"Error in clone operation!");
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.debug("Clone Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert(
|
||||
"Error Cloning Tabular Resource",
|
||||
"Error in clone operation!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package org.gcube.portlets.user.td.tablewidget.client.history;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog;
|
||||
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialogListener;
|
||||
|
@ -36,10 +38,16 @@ public class HistoryDiscard implements MonitorDialogListener {
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.error("Error retrieving trId: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
"Error retrieving current tabular resource id");
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrieving trId: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
"Error retrieving current tabular resource id");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,10 +69,22 @@ public class HistoryDiscard implements MonitorDialogListener {
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.error("Error in discard: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error in undo",
|
||||
caught.getLocalizedMessage());
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error in discard: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error in undo",
|
||||
caught.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,8 +101,6 @@ public class HistoryDiscard implements MonitorDialogListener {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void close() {
|
||||
/*
|
||||
* if (parent != null) { parent.close(); }
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.history.OpHistory;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.history.RollBackSession;
|
||||
|
@ -240,24 +242,36 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.error("Error in rollback: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error in rollback",
|
||||
"Error: "+caught.getLocalizedMessage());
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error in rollback: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3
|
||||
.alert("Error in rollback",
|
||||
"Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(String taskId) {
|
||||
Log.debug("Rollback started");
|
||||
openMonitorDialog(taskId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void loadData(ListLoadConfig loadConfig,
|
||||
final AsyncCallback<ListLoadResult<OpHistory>> callback) {
|
||||
|
||||
|
@ -269,10 +283,16 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.error("Error Retrieving History: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error retrieving history",
|
||||
"Error retrieving history");
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error Retrieving History: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error retrieving history",
|
||||
"Error retrieving history");
|
||||
}
|
||||
}
|
||||
callback.onFailure(caught);
|
||||
}
|
||||
|
@ -301,10 +321,16 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.error("Error retrieving current TRId: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
"Error retrieving current tabular resource id");
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrieving current TRId: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
"Error retrieving current tabular resource id");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -319,7 +345,7 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
|||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
protected void close() {
|
||||
/*
|
||||
* if (parent != null) { parent.close(); }
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.ArrayList;
|
|||
|
||||
import org.gcube.portlets.user.td.columnwidget.client.properties.ColumnDataPropertiesCombo;
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.normalization.DenormalizationSession;
|
||||
|
@ -286,11 +288,17 @@ public class DenormalizePanel extends FramedPanel implements
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.error("load combo failure:"
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
"Error retrieving columns of tabular resource:"
|
||||
+ trId.getId());
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("load combo failure:"
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
"Error retrieving columns of tabular resource:"
|
||||
+ trId.getId());
|
||||
}
|
||||
}
|
||||
callback.onFailure(caught);
|
||||
}
|
||||
|
@ -356,10 +364,22 @@ public class DenormalizePanel extends FramedPanel implements
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.debug("Denormalize Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error on Denormalize",
|
||||
caught.getLocalizedMessage());
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.debug("Denormalize Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error on Denormalize",
|
||||
caught.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.normalization.NormalizationSession;
|
||||
|
@ -53,7 +55,7 @@ import com.sencha.gxt.widget.core.client.grid.ColumnModel;
|
|||
import com.sencha.gxt.widget.core.client.grid.Grid;
|
||||
|
||||
public class NormalizePanel extends FramedPanel implements
|
||||
MonitorDialogListener {
|
||||
MonitorDialogListener {
|
||||
protected String WIDTH = "640px";
|
||||
protected String HEIGHT = "520px";
|
||||
|
||||
|
@ -71,24 +73,23 @@ MonitorDialogListener {
|
|||
protected TextField normalizedColumnName;
|
||||
protected TextField valueColumnName;
|
||||
protected NormalizeDialog parent;
|
||||
|
||||
|
||||
public NormalizePanel(NormalizeDialog parent,TRId trId, EventBus eventBus) {
|
||||
this.parent=parent;
|
||||
public NormalizePanel(NormalizeDialog parent, TRId trId, EventBus eventBus) {
|
||||
this.parent = parent;
|
||||
this.trId = trId;
|
||||
this.eventBus = eventBus;
|
||||
create();
|
||||
}
|
||||
|
||||
|
||||
public NormalizePanel(TRId trId, EventBus eventBus) {
|
||||
this.trId = trId;
|
||||
this.eventBus = eventBus;
|
||||
this.parent=null;
|
||||
this.parent = null;
|
||||
create();
|
||||
}
|
||||
|
||||
protected void create(){
|
||||
|
||||
|
||||
protected void create() {
|
||||
|
||||
setWidth(WIDTH);
|
||||
setHeight(HEIGHT);
|
||||
setHeaderVisible(false);
|
||||
|
@ -151,12 +152,12 @@ MonitorDialogListener {
|
|||
grid.setColumnReordering(true);
|
||||
grid.setColumnResize(false);
|
||||
|
||||
//Normalize Button
|
||||
// Normalize Button
|
||||
normalizeButton = new TextButton("Normalize");
|
||||
normalizeButton.setIcon(ResourceBundle.INSTANCE.tableNormalize());
|
||||
normalizeButton.setIconAlign(IconAlign.RIGHT);
|
||||
normalizeButton.setTitle("Normalize");
|
||||
|
||||
|
||||
SelectHandler deleteHandler = new SelectHandler() {
|
||||
|
||||
public void onSelect(SelectEvent event) {
|
||||
|
@ -167,26 +168,26 @@ MonitorDialogListener {
|
|||
normalizeButton.addSelectHandler(deleteHandler);
|
||||
|
||||
normalizedColumnName = new TextField();
|
||||
FieldLabel normalizedColumnNameLabel=new FieldLabel(normalizedColumnName, "Normalized column");
|
||||
FieldLabel normalizedColumnNameLabel = new FieldLabel(
|
||||
normalizedColumnName, "Normalized column");
|
||||
normalizedColumnNameLabel.setLabelWidth(110);
|
||||
|
||||
|
||||
valueColumnName = new TextField();
|
||||
FieldLabel valueColumnNameLabel=new FieldLabel(valueColumnName, "Value column");
|
||||
FieldLabel valueColumnNameLabel = new FieldLabel(valueColumnName,
|
||||
"Value column");
|
||||
valueColumnNameLabel.setLabelWidth(110);
|
||||
|
||||
FieldLabel columnsLabel = new FieldLabel(null,"Columns to Normalize");
|
||||
|
||||
FieldLabel columnsLabel = new FieldLabel(null, "Columns to Normalize");
|
||||
columnsLabel.setLabelWidth(150);
|
||||
|
||||
|
||||
|
||||
columnsLabel.getElement().applyStyles("font-weight:bold");
|
||||
HBoxLayoutContainer hBox = new HBoxLayoutContainer();
|
||||
hBox.add(normalizeButton, new BoxLayoutData(new Margins(2, 5, 2, 5)));
|
||||
|
||||
|
||||
VerticalLayoutContainer v = new VerticalLayoutContainer();
|
||||
v.setScrollMode(ScrollMode.AUTO);
|
||||
v.add(normalizedColumnNameLabel,new VerticalLayoutData(1, -1));
|
||||
v.add(valueColumnNameLabel,
|
||||
new VerticalLayoutData(1, -1));
|
||||
v.add(normalizedColumnNameLabel, new VerticalLayoutData(1, -1));
|
||||
v.add(valueColumnNameLabel, new VerticalLayoutData(1, -1));
|
||||
v.add(columnsLabel, new VerticalLayoutData(-1, -1, new Margins(2, 1, 5,
|
||||
1)));
|
||||
v.add(grid, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
|
@ -216,10 +217,16 @@ MonitorDialogListener {
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.error("load columns failure:"
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error retrieving columns",
|
||||
"Error retrieving columns");
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("load columns failure:"
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error retrieving columns",
|
||||
"Error retrieving columns");
|
||||
}
|
||||
}
|
||||
callback.onFailure(caught);
|
||||
}
|
||||
|
@ -241,12 +248,11 @@ MonitorDialogListener {
|
|||
UtilsGXT3.alert("Attention", "Attention no column selected!");
|
||||
return;
|
||||
}
|
||||
|
||||
String name=normalizedColumnName.getCurrentValue();
|
||||
String value=valueColumnName.getCurrentValue();
|
||||
|
||||
normalizationSession = new NormalizationSession(trId, col,
|
||||
name,value);
|
||||
|
||||
String name = normalizedColumnName.getCurrentValue();
|
||||
String value = valueColumnName.getCurrentValue();
|
||||
|
||||
normalizationSession = new NormalizationSession(trId, col, name, value);
|
||||
|
||||
TDGWTServiceAsync.INSTANCE.startNormalization(normalizationSession,
|
||||
new AsyncCallback<String>() {
|
||||
|
@ -256,10 +262,22 @@ MonitorDialogListener {
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.debug("Normalization Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3
|
||||
.alert("Error on Normalization",caught.getLocalizedMessage());
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.debug("Normalization Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error on Normalization",
|
||||
caught.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -270,7 +288,7 @@ MonitorDialogListener {
|
|||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void close() {
|
||||
if (parent != null) {
|
||||
parent.close();
|
||||
|
@ -322,6 +340,4 @@ MonitorDialogListener {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ package org.gcube.portlets.user.td.tablewidget.client.rows;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.rows.DeleteRowsSession;
|
||||
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog;
|
||||
|
@ -25,12 +27,12 @@ import com.google.web.bindery.event.shared.EventBus;
|
|||
* @author "Giancarlo Panichi"
|
||||
*
|
||||
*/
|
||||
public class DeleteRows implements MonitorDialogListener {
|
||||
public class DeleteRows implements MonitorDialogListener {
|
||||
protected TRId trId;
|
||||
protected EventBus eventBus;
|
||||
protected ArrayList<String> rows;
|
||||
protected DeleteRowsSession deleteRowsSession;
|
||||
|
||||
|
||||
public DeleteRows(TRId trId, ArrayList<String> rows, EventBus eventBus) {
|
||||
this.trId = trId;
|
||||
this.rows = rows;
|
||||
|
@ -51,11 +53,23 @@ public class DeleteRows implements MonitorDialogListener {
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.debug("Delete Rows Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3
|
||||
.alert("Error Deleting Rows",
|
||||
"Error in invocation Delete Rows operation!");
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.debug("Delete Rows Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3
|
||||
.alert("Error Deleting Rows",
|
||||
"Error in invocation Delete Rows operation!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,12 +80,11 @@ public class DeleteRows implements MonitorDialogListener {
|
|||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void close() {
|
||||
/*if (parent != null) {
|
||||
parent.close();
|
||||
}
|
||||
*/
|
||||
/*
|
||||
* if (parent != null) { parent.close(); }
|
||||
*/
|
||||
}
|
||||
|
||||
// /
|
||||
|
@ -119,5 +132,4 @@ public class DeleteRows implements MonitorDialogListener {
|
|||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.rows.DuplicatesSession;
|
||||
|
@ -51,8 +53,8 @@ import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
|
|||
import com.sencha.gxt.widget.core.client.grid.ColumnModel;
|
||||
import com.sencha.gxt.widget.core.client.grid.Grid;
|
||||
|
||||
public class DuplicatesRowsPanel extends FramedPanel
|
||||
implements MonitorDialogListener {
|
||||
public class DuplicatesRowsPanel extends FramedPanel implements
|
||||
MonitorDialogListener {
|
||||
protected String WIDTH = "640px";
|
||||
protected String HEIGHT = "520px";
|
||||
|
||||
|
@ -61,7 +63,7 @@ public class DuplicatesRowsPanel extends FramedPanel
|
|||
protected ArrayList<String> rows;
|
||||
|
||||
protected DuplicatesSession duplicatesSession;
|
||||
|
||||
|
||||
protected ListLoader<ListLoadConfig, ListLoadResult<ColumnData>> loader;
|
||||
protected Grid<ColumnData> grid;
|
||||
protected CheckBoxSelectionModel<ColumnData> sm;
|
||||
|
@ -136,10 +138,11 @@ public class DuplicatesRowsPanel extends FramedPanel
|
|||
|
||||
// Delete Button
|
||||
deleteButton = new TextButton("Delete");
|
||||
deleteButton.setIcon(ResourceBundle.INSTANCE.tableDuplicateRowsRemove());
|
||||
deleteButton
|
||||
.setIcon(ResourceBundle.INSTANCE.tableDuplicateRowsRemove());
|
||||
deleteButton.setIconAlign(IconAlign.RIGHT);
|
||||
deleteButton.setTitle("Delete Duplicates Rows");
|
||||
|
||||
|
||||
SelectHandler deleteHandler = new SelectHandler() {
|
||||
|
||||
public void onSelect(SelectEvent event) {
|
||||
|
@ -154,7 +157,7 @@ public class DuplicatesRowsPanel extends FramedPanel
|
|||
validatesButton.setIcon(ResourceBundle.INSTANCE.tableDuplicateRows());
|
||||
validatesButton.setIconAlign(IconAlign.RIGHT);
|
||||
validatesButton.setTitle("Validate Duplicates Rows");
|
||||
|
||||
|
||||
SelectHandler validatesHandler = new SelectHandler() {
|
||||
|
||||
public void onSelect(SelectEvent event) {
|
||||
|
@ -201,10 +204,16 @@ public class DuplicatesRowsPanel extends FramedPanel
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.error("load columns failure:"
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error retrieving columns",
|
||||
"Error retrieving columns");
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("load columns failure:"
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error retrieving columns",
|
||||
"Error retrieving columns");
|
||||
}
|
||||
}
|
||||
callback.onFailure(caught);
|
||||
}
|
||||
|
@ -237,11 +246,23 @@ public class DuplicatesRowsPanel extends FramedPanel
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.debug("Delete Duplicates Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3
|
||||
.alert("Error Deleting Rows",
|
||||
"Error in invocation Delete Duplicates operation!");
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.debug("Delete Duplicates Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3
|
||||
.alert("Error Deleting Rows",
|
||||
"Error in invocation Delete Duplicates operation!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -270,11 +291,23 @@ public class DuplicatesRowsPanel extends FramedPanel
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.debug("Validates Duplicates Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3
|
||||
.alert("Error Deleting Rows",
|
||||
"Error in invocation Validates Duplicates operation!");
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.debug("Validates Duplicates Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3
|
||||
.alert("Error Deleting Rows",
|
||||
"Error in invocation Validates Duplicates operation!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -285,12 +318,11 @@ public class DuplicatesRowsPanel extends FramedPanel
|
|||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void close() {
|
||||
/*if (parent != null) {
|
||||
parent.close();
|
||||
}
|
||||
*/
|
||||
/*
|
||||
* if (parent != null) { parent.close(); }
|
||||
*/
|
||||
}
|
||||
|
||||
// /
|
||||
|
|
Loading…
Reference in New Issue