Fixed Final and Lock error
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-table-widget@100287 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
74ad4e36fd
commit
3983d12f6d
|
@ -8,6 +8,8 @@ import org.gcube.portlets.user.td.columnwidget.client.dimension.DimensionRowSele
|
|||
import org.gcube.portlets.user.td.columnwidget.client.dimension.DimensionRowSelectionListener;
|
||||
import org.gcube.portlets.user.td.columnwidget.client.dimension.DimensionRowsProperties;
|
||||
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.DimensionRow;
|
||||
|
@ -207,6 +209,11 @@ public class EditRowPanel extends FramedPanel implements MonitorDialogListener {
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("load columns failure:"
|
||||
+ caught.getLocalizedMessage());
|
||||
|
@ -214,6 +221,7 @@ public class EditRowPanel extends FramedPanel implements MonitorDialogListener {
|
|||
"Error retrieving columns");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(ArrayList<ColumnData> result) {
|
||||
Log.trace("loaded " + result.size() + " ColumnData");
|
||||
|
@ -565,8 +573,10 @@ public class EditRowPanel extends FramedPanel implements MonitorDialogListener {
|
|||
maps.put(columnId, val);
|
||||
} else {
|
||||
UtilsGXT3
|
||||
.alert("Attentions","The value of "+
|
||||
colCurrent.getLabel()
|
||||
.alert("Attentions",
|
||||
"The value of "
|
||||
+ colCurrent
|
||||
.getLabel()
|
||||
+ " is not a valid text representation for geometry type ( e.g. POINT(34 56) or LINESTRING(65 34, 56.43 78.65)!");
|
||||
btnSave.enable();
|
||||
return;
|
||||
|
@ -660,11 +670,23 @@ public class EditRowPanel extends FramedPanel implements MonitorDialogListener {
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
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 {
|
||||
UtilsGXT3.alert("Error",
|
||||
"Error in operation invocation!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(String taskId) {
|
||||
openMonitorDialog(taskId);
|
||||
|
|
|
@ -4,6 +4,7 @@ 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.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.Validations;
|
||||
|
@ -193,13 +194,19 @@ public class ValidationsTablePanel extends FramedPanel {
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Load validations metadata failure: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert(
|
||||
"Error retrieving validations metadata",
|
||||
UtilsGXT3
|
||||
.alert("Error retrieving validations metadata",
|
||||
"Error retrieving validations metadata");
|
||||
}
|
||||
}
|
||||
callback.onFailure(caught);
|
||||
}
|
||||
|
||||
|
@ -240,6 +247,11 @@ public class ValidationsTablePanel extends FramedPanel {
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrieving current TRId: "
|
||||
+ caught.getLocalizedMessage());
|
||||
|
@ -247,6 +259,7 @@ public class ValidationsTablePanel extends FramedPanel {
|
|||
"Error retrieving current tabular resource id");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(TRId result) {
|
||||
Log.debug("retrieved " + result);
|
||||
|
|
|
@ -7,6 +7,8 @@ import java.util.List;
|
|||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.Constants;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.OperationsId;
|
||||
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.task.InvocationS;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.task.TaskResumeSession;
|
||||
|
@ -76,7 +78,7 @@ import com.sencha.gxt.widget.core.client.treegrid.TreeGrid;
|
|||
*
|
||||
*/
|
||||
public class ValidationsTasksPanel extends FramedPanel implements
|
||||
MonitorDialogListener {
|
||||
MonitorDialogListener {
|
||||
protected String WIDTH = "298px";
|
||||
protected String HEIGHT = "520px";
|
||||
protected ValidationsTasksPanel thisPanel;
|
||||
|
@ -95,7 +97,6 @@ MonitorDialogListener {
|
|||
protected TreeGrid<BaseDto> tree;
|
||||
private boolean updateTR;
|
||||
|
||||
|
||||
class KeyProvider implements ModelKeyProvider<BaseDto> {
|
||||
@Override
|
||||
public String getKey(BaseDto item) {
|
||||
|
@ -113,7 +114,7 @@ MonitorDialogListener {
|
|||
this.eventBus = eventBus;
|
||||
this.thisPanel = this;
|
||||
forceLayoutOnResize = true;
|
||||
updateTR=false;
|
||||
updateTR = false;
|
||||
init();
|
||||
retrieveCurrentTR();
|
||||
|
||||
|
@ -131,13 +132,11 @@ MonitorDialogListener {
|
|||
this.eventBus = eventBus;
|
||||
this.thisPanel = this;
|
||||
forceLayoutOnResize = true;
|
||||
updateTR=false;
|
||||
updateTR = false;
|
||||
init();
|
||||
retrieveValidations();
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void init() {
|
||||
setWidth(WIDTH);
|
||||
setHeight(HEIGHT);
|
||||
|
@ -147,7 +146,7 @@ MonitorDialogListener {
|
|||
}
|
||||
|
||||
protected void createTreeData() {
|
||||
if(updateTR){
|
||||
if (updateTR) {
|
||||
store.clear();
|
||||
store.commitChanges();
|
||||
addChildrensToStore();
|
||||
|
@ -159,7 +158,6 @@ MonitorDialogListener {
|
|||
tree.expandAll();
|
||||
forceLayout();
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void create() {
|
||||
|
@ -306,8 +304,6 @@ MonitorDialogListener {
|
|||
add(con, new MarginData(0));
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void addChildrensToStore() {
|
||||
gen = new TreeDataGenerator(validationsTasksMetadata);
|
||||
|
||||
|
@ -319,7 +315,6 @@ MonitorDialogListener {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void requestSolution(Context context) {
|
||||
|
@ -504,14 +499,20 @@ MonitorDialogListener {
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Load validations metadata failure: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert(
|
||||
"Error retrieving validations metadata",
|
||||
UtilsGXT3
|
||||
.alert("Error retrieving validations metadata",
|
||||
"Error retrieving validations metadata");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(ValidationsTasksMetadata result) {
|
||||
Log.debug("Loaded " + result.getId());
|
||||
|
@ -525,13 +526,13 @@ MonitorDialogListener {
|
|||
}
|
||||
|
||||
public void update() {
|
||||
updateTR=true;
|
||||
updateTR = true;
|
||||
retrieveCurrentTR();
|
||||
}
|
||||
|
||||
public void update(TRId trId) {
|
||||
this.trId = trId;
|
||||
updateTR=true;
|
||||
updateTR = true;
|
||||
retrieveValidations();
|
||||
}
|
||||
|
||||
|
@ -542,6 +543,11 @@ MonitorDialogListener {
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrieving current TRId: "
|
||||
+ caught.getLocalizedMessage());
|
||||
|
@ -549,6 +555,7 @@ MonitorDialogListener {
|
|||
"Error retrieving current tabular resource id");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(TRId result) {
|
||||
Log.debug("retrieved " + result);
|
||||
|
@ -579,11 +586,23 @@ MonitorDialogListener {
|
|||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
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(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error in Resume",
|
||||
caught.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -596,12 +615,10 @@ MonitorDialogListener {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void close() {
|
||||
/*if (parent != null) {
|
||||
parent.close();
|
||||
}*/
|
||||
/*
|
||||
* if (parent != null) { parent.close(); }
|
||||
*/
|
||||
}
|
||||
|
||||
// /
|
||||
|
@ -649,7 +666,6 @@ MonitorDialogListener {
|
|||
|
||||
}
|
||||
|
||||
|
||||
// @SuppressWarnings("rawtypes")
|
||||
// protected AbstractCell actionButton = new AbstractCell<Boolean>() {
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue