Fixed Final and Lock error

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@100216 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-09-26 10:20:11 +00:00
parent 683366a81d
commit 274d781987
9 changed files with 459 additions and 164 deletions

View File

@ -7,6 +7,8 @@ import org.gcube.portlets.user.td.columnwidget.client.properties.ColumnDataPrope
import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle; import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle;
import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3; import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync; 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.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData; import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.DeleteColumnSession; import org.gcube.portlets.user.td.gwtservice.shared.tr.column.DeleteColumnSession;
@ -83,7 +85,7 @@ public class DeleteColumnPanel extends FramedPanel implements
protected FieldLabel columnsSelectLabel; protected FieldLabel columnsSelectLabel;
protected DeleteColumnSession deleteColumnSession; protected DeleteColumnSession deleteColumnSession;
private ListStore<ColumnData> store; private ListStore<ColumnData> store;
public DeleteColumnPanel(TRId trId, String columnName, EventBus eventBus) { public DeleteColumnPanel(TRId trId, String columnName, EventBus eventBus) {
@ -230,10 +232,22 @@ public class DeleteColumnPanel extends FramedPanel implements
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.error("load columns failure:" if (caught instanceof TDGWTIsLockedException) {
+ caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving columns", UtilsGXT3.alert("Error Locked",
"Error retrieving columns"); caught.getLocalizedMessage());
} else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.error("load columns failure:"
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving columns",
"Error retrieving columns");
}
}
} }
callback.onFailure(caught); callback.onFailure(caught);
@ -245,12 +259,14 @@ public class DeleteColumnPanel extends FramedPanel implements
callback.onSuccess(new ListLoadResultBean<ColumnData>( callback.onSuccess(new ListLoadResultBean<ColumnData>(
result)); result));
} catch(UmbrellaException e){ } catch (UmbrellaException e) {
Log.debug("Umbrella exception "+e.getLocalizedMessage()); Log.debug("Umbrella exception "
} catch (com.google.web.bindery.event.shared.UmbrellaException e){ + e.getLocalizedMessage());
Log.debug("Umbrella exception "+e.getLocalizedMessage()); } catch (com.google.web.bindery.event.shared.UmbrellaException e) {
Log.debug("Umbrella exception "
+ e.getLocalizedMessage());
} }
} }
}); });
@ -278,11 +294,23 @@ public class DeleteColumnPanel extends FramedPanel implements
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.debug("Delete Column Error: " if (caught instanceof TDGWTIsLockedException) {
+ caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3 UtilsGXT3.alert("Error Locked",
.alert("Delete Column Error ", caught.getLocalizedMessage());
"Error in invocation of delete column operation!"); } else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.debug("Delete Column Error: "
+ caught.getLocalizedMessage());
UtilsGXT3
.alert("Delete Column Error ",
"Error in invocation of delete column operation!");
}
}
} }
} }
@ -294,14 +322,13 @@ public class DeleteColumnPanel extends FramedPanel implements
} }
public void close() { public void close() {
if (parent != null) { if (parent != null) {
parent.close(); parent.close();
} }
} }
/// // /
protected void openMonitorDialog(String taskId) { protected void openMonitorDialog(String taskId) {
MonitorDialog monitorDialog = new MonitorDialog(taskId, eventBus); MonitorDialog monitorDialog = new MonitorDialog(taskId, eventBus);
monitorDialog.addProgressDialogListener(this); monitorDialog.addProgressDialogListener(this);

View File

@ -6,6 +6,8 @@ import java.util.HashMap;
import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle; import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle;
import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3; import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync; 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.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData; import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.LabelColumnSession; import org.gcube.portlets.user.td.gwtservice.shared.tr.column.LabelColumnSession;
@ -85,11 +87,23 @@ public class LabelColumnPanel extends FramedPanel implements
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.error("load combo failure:" if (caught instanceof TDGWTIsLockedException) {
+ caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error", UtilsGXT3.alert("Error Locked",
"Error retrieving columns of tabular resource:" caught.getLocalizedMessage());
+ trId.getId()); } else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.error("load combo failure:"
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error",
"Error retrieving columns of tabular resource:"
+ trId.getId());
}
}
} }
} }
@ -126,15 +140,15 @@ public class LabelColumnPanel extends FramedPanel implements
protected void create() { protected void create() {
Log.debug("Create LabelColunmPanel"); Log.debug("Create LabelColunmPanel");
SimpleContainer columnsContainer = new SimpleContainer(); SimpleContainer columnsContainer = new SimpleContainer();
//columnsContainer.setHeight(getOffsetHeight(true)-50); // columnsContainer.setHeight(getOffsetHeight(true)-50);
columnsLayoutContainer = new VerticalLayoutContainer(); columnsLayoutContainer = new VerticalLayoutContainer();
columnsLayoutContainer.setScrollMode(ScrollMode.AUTO); columnsLayoutContainer.setScrollMode(ScrollMode.AUTO);
columnsContainer.add(columnsLayoutContainer); columnsContainer.add(columnsLayoutContainer);
addFields(); addFields();
columnsContainer.forceLayout(); columnsContainer.forceLayout();
change = new TextButton("Change"); change = new TextButton("Change");
change.setIcon(ResourceBundle.INSTANCE.columnLabel()); change.setIcon(ResourceBundle.INSTANCE.columnLabel());
change.setIconAlign(IconAlign.RIGHT); change.setIconAlign(IconAlign.RIGHT);
@ -173,7 +187,7 @@ public class LabelColumnPanel extends FramedPanel implements
protected ArrayList<FieldLabel> generateFields() { protected ArrayList<FieldLabel> generateFields() {
ArrayList<FieldLabel> fields = new ArrayList<FieldLabel>(); ArrayList<FieldLabel> fields = new ArrayList<FieldLabel>();
for (ColumnData col : columns) { for (ColumnData col : columns) {
if (col != null) { if (col != null) {
FieldLabel textLabel; FieldLabel textLabel;
@ -192,9 +206,9 @@ public class LabelColumnPanel extends FramedPanel implements
} }
fields.add(textLabel); fields.add(textLabel);
} }
} }
Log.debug("Fields: "+fields.size()); Log.debug("Fields: " + fields.size());
return fields; return fields;
} }
@ -249,7 +263,7 @@ public class LabelColumnPanel extends FramedPanel implements
} }
if (maps.size() > 0) { if (maps.size() > 0) {
labelColumnSession = new LabelColumnSession(trId,maps); labelColumnSession = new LabelColumnSession(trId, maps);
callLabelColumn(); callLabelColumn();
} else { } else {
UtilsGXT3.alert("Attention", "Insert valid labels!"); UtilsGXT3.alert("Attention", "Insert valid labels!");
@ -266,11 +280,23 @@ public class LabelColumnPanel extends FramedPanel implements
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.debug("Change The Column Label Error: " if (caught instanceof TDGWTIsLockedException) {
+ caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3 UtilsGXT3.alert("Error Locked",
.alert("Error Changing The Column Label", caught.getLocalizedMessage());
"Error in invocation of Change The Column Label operation!"); } else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.debug("Change The Column Label Error: "
+ caught.getLocalizedMessage());
UtilsGXT3
.alert("Error Changing The Column Label",
"Error in invocation of Change The Column Label operation!");
}
}
} }
} }

View File

@ -6,6 +6,8 @@ import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle;
import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3; import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync; 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.Constants;
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.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.task.InvocationS; import org.gcube.portlets.user.td.gwtservice.shared.task.InvocationS;
import org.gcube.portlets.user.td.gwtservice.shared.task.TaskResumeSession; import org.gcube.portlets.user.td.gwtservice.shared.task.TaskResumeSession;
@ -41,8 +43,9 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
public class ReplaceBatchDialog extends Window implements MonitorDialogListener { public class ReplaceBatchDialog extends Window implements MonitorDialogListener {
// ProgressDialogListener, ResumeDialogListener { // ProgressDialogListener, ResumeDialogListener {
protected enum CALLTYPE { protected enum CALLTYPE {
REPLACEBATH, RESUME; REPLACEBATH, RESUME;
} }
protected String WIDTH = "650px"; protected String WIDTH = "650px";
protected String HEIGHT = "530px"; protected String HEIGHT = "530px";
protected TRId trId; protected TRId trId;
@ -53,7 +56,7 @@ public class ReplaceBatchDialog extends Window implements MonitorDialogListener
protected CALLTYPE callType; protected CALLTYPE callType;
private InvocationS invocationS; private InvocationS invocationS;
private ConditionCode conditionCode; // For Curation private ConditionCode conditionCode; // For Curation
/** /**
* *
* @param trId * @param trId
@ -250,10 +253,22 @@ public class ReplaceBatchDialog extends Window implements MonitorDialogListener
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.error("Start Replace Batch failed:" if (caught instanceof TDGWTIsLockedException) {
+ caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error on batch replace", UtilsGXT3.alert("Error Locked",
"Error on batch replace"); caught.getLocalizedMessage());
} else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.error("Start Replace Batch failed:"
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error on batch replace",
"Error on batch replace");
}
}
} }
close(); close();
@ -273,9 +288,9 @@ public class ReplaceBatchDialog extends Window implements MonitorDialogListener
*/ */
// TODO // TODO
protected void callReplaceBatchColumnProgressDialog(String taskId) { protected void callReplaceBatchColumnProgressDialog(String taskId) {
callType=CALLTYPE.REPLACEBATH; callType = CALLTYPE.REPLACEBATH;
openMonitorDialog(taskId); openMonitorDialog(taskId);
} }
/** /**
@ -292,11 +307,25 @@ public class ReplaceBatchDialog extends Window implements MonitorDialogListener
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.error("Task Resume failed:" if (caught instanceof TDGWTIsLockedException) {
+ caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error on task resume", UtilsGXT3.alert("Error Locked",
"Error on task resume (taskId=" caught.getLocalizedMessage());
+ taskIdOfInvocationS + ")"); } else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.error("Task Resume failed:"
+ caught.getLocalizedMessage());
UtilsGXT3
.alert("Error on task resume",
"Error on task resume (taskId="
+ taskIdOfInvocationS
+ ")");
}
}
} }
close(); close();
@ -327,11 +356,25 @@ public class ReplaceBatchDialog extends Window implements MonitorDialogListener
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.error("Task Resume failed:" if (caught instanceof TDGWTIsLockedException) {
+ caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error on task resume", UtilsGXT3.alert("Error Locked",
"Error on task resume (taskId=" caught.getLocalizedMessage());
+ taskIdOfInvocationS + ")"); } else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.error("Task Resume failed:"
+ caught.getLocalizedMessage());
UtilsGXT3
.alert("Error on task resume",
"Error on task resume (taskId="
+ taskIdOfInvocationS
+ ")");
}
}
} }
close(); close();
@ -350,16 +393,11 @@ public class ReplaceBatchDialog extends Window implements MonitorDialogListener
* *
*/ */
protected void callForTaskResume(String taskId) { protected void callForTaskResume(String taskId) {
callType=CALLTYPE.RESUME; callType = CALLTYPE.RESUME;
openMonitorDialog(taskId); openMonitorDialog(taskId);
} }
/** /**
* *
* @param replaceBatchColumnSession * @param replaceBatchColumnSession
@ -390,16 +428,14 @@ public class ReplaceBatchDialog extends Window implements MonitorDialogListener
/** /**
* *
protected void callChangeColumnTypeProgressDialog() {
protected void callChangeColumnTypeProgressDialog() { * ChangeColumnTypeProgressDialog changeColumnTypeProgressDialog = new
ChangeColumnTypeProgressDialog changeColumnTypeProgressDialog = new ChangeColumnTypeProgressDialog( * ChangeColumnTypeProgressDialog( eventBus);
eventBus); * changeColumnTypeProgressDialog.addProgressDialogListener(this);
changeColumnTypeProgressDialog.addProgressDialogListener(this); * changeColumnTypeProgressDialog.show(); }
changeColumnTypeProgressDialog.show();
}
*/ */
/// // /
protected void openMonitorDialog(String taskId) { protected void openMonitorDialog(String taskId) {
MonitorDialog monitorDialog = new MonitorDialog(taskId, eventBus); MonitorDialog monitorDialog = new MonitorDialog(taskId, eventBus);
monitorDialog.addProgressDialogListener(this); monitorDialog.addProgressDialogListener(this);
@ -408,7 +444,7 @@ public class ReplaceBatchDialog extends Window implements MonitorDialogListener
@Override @Override
public void operationComplete(TRId trId) { public void operationComplete(TRId trId) {
switch(callType){ switch (callType) {
case REPLACEBATH: case REPLACEBATH:
this.trId = trId; this.trId = trId;
if (taskIdOfInvocationS == null) { if (taskIdOfInvocationS == null) {
@ -427,8 +463,8 @@ public class ReplaceBatchDialog extends Window implements MonitorDialogListener
case AmbiguousValueOnExternalReference: case AmbiguousValueOnExternalReference:
ChangeTableWhy why = ChangeTableWhy.TABLECURATION; ChangeTableWhy why = ChangeTableWhy.TABLECURATION;
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent( ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
ChangeTableRequestType.COLUMNREPLACEBATCH, trId, ChangeTableRequestType.COLUMNREPLACEBATCH,
why); trId, why);
eventBus.fireEvent(changeTableRequestEvent); eventBus.fireEvent(changeTableRequestEvent);
close(); close();
break; break;
@ -479,14 +515,14 @@ public class ReplaceBatchDialog extends Window implements MonitorDialogListener
break; break;
default: default:
break; break;
} }
} }
@Override @Override
public void operationFailed(Throwable caught, String reason, String details) { public void operationFailed(Throwable caught, String reason, String details) {
switch(callType){ switch (callType) {
case REPLACEBATH: case REPLACEBATH:
UtilsGXT3.alert("Error in Replace Batch", reason); UtilsGXT3.alert("Error in Replace Batch", reason);
close(); close();
@ -507,7 +543,7 @@ public class ReplaceBatchDialog extends Window implements MonitorDialogListener
ChangeTableRequestType.COLUMNREPLACEBATCH, trId, why); ChangeTableRequestType.COLUMNREPLACEBATCH, trId, why);
eventBus.fireEvent(changeTableRequestEvent); eventBus.fireEvent(changeTableRequestEvent);
close(); close();
} }
@Override @Override

View File

@ -15,6 +15,8 @@ import org.gcube.portlets.user.td.columnwidget.client.store.ShowOccurrencesTypeS
import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3; import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync; 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.Constants;
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.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.task.InvocationS; import org.gcube.portlets.user.td.gwtservice.shared.task.InvocationS;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData; import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
@ -204,8 +206,7 @@ public class ReplaceBatchPanel extends FramedPanel implements
.create(ShowOccurrencesTypeProperties.class); .create(ShowOccurrencesTypeProperties.class);
storeShowOccurrencesType = new ListStore<ShowOccurrencesTypeElement>( storeShowOccurrencesType = new ListStore<ShowOccurrencesTypeElement>(
propsShowOccurrencesType.id()); propsShowOccurrencesType.id());
comboShowOccurrencesType = new ComboBox<ShowOccurrencesTypeElement>( comboShowOccurrencesType = new ComboBox<ShowOccurrencesTypeElement>(
storeShowOccurrencesType, propsShowOccurrencesType.label()); storeShowOccurrencesType, propsShowOccurrencesType.label());
Log.trace("ComboMeasureType created"); Log.trace("ComboMeasureType created");
@ -439,7 +440,8 @@ public class ReplaceBatchPanel extends FramedPanel implements
add(v); add(v);
if (curation) { if (curation) {
storeShowOccurrencesType.addAll(ShowOccurrencesTypeStore.getShowOccurrencesType()); storeShowOccurrencesType.addAll(ShowOccurrencesTypeStore
.getShowOccurrencesType());
if (connection != null) { if (connection != null) {
Log.debug("Selected connection: " + connection); Log.debug("Selected connection: " + connection);
connectionField.setValue(connection.getLabel()); connectionField.setValue(connection.getLabel());
@ -463,7 +465,8 @@ public class ReplaceBatchPanel extends FramedPanel implements
cViewData.getTargetTableColumnId()); cViewData.getTargetTableColumnId());
retrieveConnectionForViewColumn(refCol); retrieveConnectionForViewColumn(refCol);
} else { } else {
storeShowOccurrencesType.addAll(ShowOccurrencesTypeStore.getShowOccurrencesType()); storeShowOccurrencesType.addAll(ShowOccurrencesTypeStore
.getShowOccurrencesType());
Log.debug("Not Is View Column"); Log.debug("Not Is View Column");
connectionField.setVisible(false); connectionField.setVisible(false);
btnDisconnect.setVisible(false); btnDisconnect.setVisible(false);
@ -483,10 +486,22 @@ public class ReplaceBatchPanel extends FramedPanel implements
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.error("load column failure:" if (caught instanceof TDGWTIsLockedException) {
+ caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving column", UtilsGXT3.alert("Error Locked",
"Error retrieving column"); caught.getLocalizedMessage());
} else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.error("load column failure:"
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving column",
"Error retrieving column");
}
}
} }
} }
@ -510,10 +525,22 @@ public class ReplaceBatchPanel extends FramedPanel implements
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.error("load column failure:" if (caught instanceof TDGWTIsLockedException) {
+ caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving column", UtilsGXT3.alert("Error Locked",
"Error retrieving column"); caught.getLocalizedMessage());
} else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.error("load column failure:"
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving column",
"Error retrieving column");
}
}
} }
} }
@ -536,10 +563,22 @@ public class ReplaceBatchPanel extends FramedPanel implements
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.error("load column failure:" if (caught instanceof TDGWTIsLockedException) {
+ caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving column", UtilsGXT3.alert("Error Locked",
"Error retrieving column"); caught.getLocalizedMessage());
} else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.error("load column failure:"
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving column",
"Error retrieving column");
}
}
} }
} }
@ -615,10 +654,22 @@ public class ReplaceBatchPanel extends FramedPanel implements
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.error("load columns failure:" if (caught instanceof TDGWTIsLockedException) {
+ caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving columns", UtilsGXT3.alert("Error Locked",
"Error retrieving columns"); caught.getLocalizedMessage());
} else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.error("load columns failure:"
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving columns",
"Error retrieving columns");
}
}
} }
callback.onFailure(caught); callback.onFailure(caught);
} }
@ -1014,10 +1065,23 @@ public class ReplaceBatchPanel extends FramedPanel implements
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.error("load column failure:" if (caught instanceof TDGWTIsLockedException) {
+ caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving connection", UtilsGXT3.alert("Error Locked",
"Error retrieving connection column"); caught.getLocalizedMessage());
} else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.error("load column failure:"
+ caught.getLocalizedMessage());
UtilsGXT3
.alert("Error retrieving connection",
"Error retrieving connection column");
}
}
} }
} }
@ -1041,10 +1105,23 @@ public class ReplaceBatchPanel extends FramedPanel implements
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.error("load column failure:" if (caught instanceof TDGWTIsLockedException) {
+ caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving connection", UtilsGXT3.alert("Error Locked",
"Error retrieving connection column"); caught.getLocalizedMessage());
} else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.error("load column failure:"
+ caught.getLocalizedMessage());
UtilsGXT3
.alert("Error retrieving connection",
"Error retrieving connection column");
}
}
} }
} }

View File

@ -21,6 +21,8 @@ import org.gcube.portlets.user.td.columnwidget.client.store.TimeDimensionTypeEle
import org.gcube.portlets.user.td.columnwidget.client.store.TimeDimensionTypeStore; import org.gcube.portlets.user.td.columnwidget.client.store.TimeDimensionTypeStore;
import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3; import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync; 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.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData; import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.gwtservice.shared.tr.DefNewColumn; import org.gcube.portlets.user.td.gwtservice.shared.tr.DefNewColumn;
@ -829,11 +831,23 @@ public class AddColumnPanel extends FramedPanel implements
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.debug("Add Column Error: " if (caught instanceof TDGWTIsLockedException) {
+ caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3 UtilsGXT3.alert("Error Locked",
.alert("Add Column Error ", caught.getLocalizedMessage());
"Error in invocation of add column operation!"); } else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.debug("Add Column Error: "
+ caught.getLocalizedMessage());
UtilsGXT3
.alert("Add Column Error ",
"Error in invocation of add column operation!");
}
}
} }
} }
@ -883,10 +897,23 @@ public class AddColumnPanel extends FramedPanel implements
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.debug("Error retrieving columns: " if (caught instanceof TDGWTIsLockedException) {
+ caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving columns", UtilsGXT3.alert("Error Locked",
"Error retrieving columns on server!"); caught.getLocalizedMessage());
} else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.debug("Error retrieving columns: "
+ caught.getLocalizedMessage());
UtilsGXT3
.alert("Error retrieving columns",
"Error retrieving columns on server!");
}
}
} }
} }
@ -913,9 +940,21 @@ public class AddColumnPanel extends FramedPanel implements
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.debug(caught.getLocalizedMessage()); if (caught instanceof TDGWTIsLockedException) {
UtilsGXT3.alert("Error retrieving locales", Log.error(caught.getLocalizedMessage());
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 retrieving locales",
caught.getLocalizedMessage());
}
}
} }
} }

View File

@ -10,6 +10,8 @@ import org.gcube.portlets.user.td.columnwidget.client.store.ColumnTypeCodeStore;
import org.gcube.portlets.user.td.columnwidget.client.store.LocaleTypeElement; import org.gcube.portlets.user.td.columnwidget.client.store.LocaleTypeElement;
import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3; import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync; 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.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.DefNewColumn; import org.gcube.portlets.user.td.gwtservice.shared.tr.DefNewColumn;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
@ -63,7 +65,6 @@ public class CreateDefColumnPanel extends FramedPanel {
protected EventBus eventBus; protected EventBus eventBus;
protected CreateDefColumnDialog parent; protected CreateDefColumnDialog parent;
protected TableType tableType; protected TableType tableType;
protected ComboBox<ColumnTypeCodeElement> comboColumnTypeCode = null; protected ComboBox<ColumnTypeCodeElement> comboColumnTypeCode = null;
protected FieldLabel comboColumnTypeCodeLabel; protected FieldLabel comboColumnTypeCodeLabel;
@ -87,7 +88,8 @@ public class CreateDefColumnPanel extends FramedPanel {
public CreateDefColumnPanel(CreateDefColumnDialog parent, public CreateDefColumnPanel(CreateDefColumnDialog parent,
TableType tableType, EventBus eventBus) { TableType tableType, EventBus eventBus) {
super(); super();
Log.debug("CreateDefColumnPanel[parent: "+parent+", tableType: "+tableType); Log.debug("CreateDefColumnPanel[parent: " + parent + ", tableType: "
+ tableType);
this.parent = parent; this.parent = parent;
this.eventBus = eventBus; this.eventBus = eventBus;
this.tableType = tableType; this.tableType = tableType;
@ -375,9 +377,21 @@ public class CreateDefColumnPanel extends FramedPanel {
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.debug(caught.getLocalizedMessage()); if (caught instanceof TDGWTIsLockedException) {
UtilsGXT3.alert("Error retrieving locales", Log.error(caught.getLocalizedMessage());
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 retrieving locales",
caught.getLocalizedMessage());
}
}
} }
} }

View File

@ -8,6 +8,8 @@ import java.util.List;
import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle; import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle;
import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3; import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync; 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.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource; import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData; import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData;
@ -247,11 +249,23 @@ public class CodelistSelectionDialog extends Window {
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.debug("Attention", if (caught instanceof TDGWTIsLockedException) {
"This tabular resource does not have a valid table"); Log.error(caught.getLocalizedMessage());
UtilsGXT3 UtilsGXT3.alert("Error Locked",
.alert("Attention", caught.getLocalizedMessage());
} else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.debug("Attention",
"This tabular resource does not have a valid table"); "This tabular resource does not have a valid table");
UtilsGXT3
.alert("Attention",
"This tabular resource does not have a valid table");
}
}
} }
} }
@ -316,11 +330,24 @@ public class CodelistSelectionDialog extends Window {
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.debug("Error Retrieving Codelist", if (caught instanceof TDGWTIsLockedException) {
caught.getMessage()); Log.error(caught.getLocalizedMessage());
caught.printStackTrace(); UtilsGXT3.alert("Error Locked",
UtilsGXT3.alert("Error Retrieving Codelist", caught.getLocalizedMessage());
"Error retrieving codelist on server"); } else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.debug("Error Retrieving Codelist",
caught.getMessage());
caught.printStackTrace();
UtilsGXT3
.alert("Error Retrieving Codelist",
"Error retrieving codelist on server");
}
}
} }
} }
@ -347,12 +374,25 @@ public class CodelistSelectionDialog extends Window {
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.debug("Error in setCodelistsPagingLoader", if (caught instanceof TDGWTIsLockedException) {
caught.getMessage()); Log.error(caught.getLocalizedMessage());
caught.printStackTrace(); UtilsGXT3.alert("Error Locked",
UtilsGXT3 caught.getLocalizedMessage());
.alert("Error Retrieving Codelist", } else {
"Error error in retrieving the codelists during the initialization phase!"); if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.debug(
"Error in setCodelistsPagingLoader",
caught.getMessage());
caught.printStackTrace();
UtilsGXT3
.alert("Error Retrieving Codelist",
"Error error in retrieving the codelists during the initialization phase!");
}
}
} }
} }

View File

@ -7,6 +7,8 @@ import org.gcube.portlets.user.td.columnwidget.client.properties.TabResourceProp
import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle; import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle;
import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3; import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync; 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.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData; import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource; import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
@ -263,10 +265,23 @@ public class ConnectCodelistDialog extends Window implements
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.debug("Error retrieving columns: " if (caught instanceof TDGWTIsLockedException) {
+ caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving columns", UtilsGXT3.alert("Error Locked",
"Error retrieving columns on server!"); caught.getLocalizedMessage());
} else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.debug("Error retrieving columns: "
+ caught.getLocalizedMessage());
UtilsGXT3
.alert("Error retrieving columns",
"Error retrieving columns on server!");
}
}
} }
} }

View File

@ -8,6 +8,8 @@ import org.gcube.portlets.user.td.columnwidget.client.dimension.DimensionRowsPro
import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle; import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle;
import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3; import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync; 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.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData; import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.gwtservice.shared.tr.DimensionRow; import org.gcube.portlets.user.td.gwtservice.shared.tr.DimensionRow;
@ -56,10 +58,9 @@ import com.sencha.gxt.widget.core.client.form.TextField;
* *
*/ */
public class ReplacePanel extends FramedPanel implements public class ReplacePanel extends FramedPanel implements
DimensionRowSelectionListener, DimensionRowSelectionListener, MonitorDialogListener {
MonitorDialogListener {
private DateTimeFormat sdf = DateTimeFormat.getFormat("yyyy-MM-dd"); private DateTimeFormat sdf = DateTimeFormat.getFormat("yyyy-MM-dd");
protected String WIDTH = "500px"; protected String WIDTH = "500px";
protected String HEIGHT = "150px"; protected String HEIGHT = "150px";
protected EventBus eventBus; protected EventBus eventBus;
@ -70,7 +71,6 @@ public class ReplacePanel extends FramedPanel implements
protected DimensionRow dimensionRow; protected DimensionRow dimensionRow;
protected ReplaceColumnSession replaceColumnSession; protected ReplaceColumnSession replaceColumnSession;
private ComboBox<DimensionRow> comboDimensionType; private ComboBox<DimensionRow> comboDimensionType;
private FieldLabel comboDimensionTypeLabel; private FieldLabel comboDimensionTypeLabel;
@ -112,10 +112,22 @@ public class ReplacePanel extends FramedPanel implements
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.error("Error retrieving column: " if (caught instanceof TDGWTIsLockedException) {
+ caught.getMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving column", UtilsGXT3.alert("Error Locked",
caught.getMessage()); caught.getLocalizedMessage());
} else {
if (caught instanceof TDGWTIsFinalException) {
Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.error("Error retrieving column: "
+ caught.getMessage());
UtilsGXT3.alert("Error retrieving column",
caught.getMessage());
}
}
} }
} }
@ -338,7 +350,7 @@ public class ReplacePanel extends FramedPanel implements
if (d != null) { if (d != null) {
String dateS = sdf.format(d); String dateS = sdf.format(d);
checked = dateS; checked = dateS;
} }
} else { } else {
if (column.getDataTypeName().compareTo("Geometry") == 0) { if (column.getDataTypeName().compareTo("Geometry") == 0) {
@ -392,7 +404,7 @@ public class ReplacePanel extends FramedPanel implements
public void onSuccess(String taskId) { public void onSuccess(String taskId) {
Log.debug("Submitted replace column value"); Log.debug("Submitted replace column value");
openMonitorDialog(taskId); openMonitorDialog(taskId);
} }
@Override @Override
@ -401,23 +413,32 @@ public class ReplacePanel extends FramedPanel implements
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.error("Error submitting replace column value: " if (caught instanceof TDGWTIsLockedException) {
+ caught.getMessage() + " " Log.error(caught.getLocalizedMessage());
+ caught.getCause()); UtilsGXT3.alert("Error Locked",
caught.printStackTrace(); caught.getLocalizedMessage());
UtilsGXT3.alert( } else {
"Error submitting replace column value", if (caught instanceof TDGWTIsFinalException) {
caught.getMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Final",
caught.getLocalizedMessage());
} else {
Log.error("Error submitting replace column value: "
+ caught.getMessage()
+ " "
+ caught.getCause());
caught.printStackTrace();
UtilsGXT3
.alert("Error submitting replace column value",
caught.getMessage());
}
}
} }
} }
}); });
} }
protected void addHandlersForComboDimensionType( protected void addHandlersForComboDimensionType(
final LabelProvider<DimensionRow> labelProvider) { final LabelProvider<DimensionRow> labelProvider) {
@ -464,14 +485,14 @@ public class ReplacePanel extends FramedPanel implements
dimensionRow = null; dimensionRow = null;
} }
public void close() { public void close() {
if (parent != null) { if (parent != null) {
parent.close(); parent.close();
} }
} }
/// // /
protected void openMonitorDialog(String taskId) { protected void openMonitorDialog(String taskId) {
MonitorDialog monitorDialog = new MonitorDialog(taskId, eventBus); MonitorDialog monitorDialog = new MonitorDialog(taskId, eventBus);
monitorDialog.addProgressDialogListener(this); monitorDialog.addProgressDialogListener(this);
@ -515,5 +536,5 @@ public class ReplacePanel extends FramedPanel implements
close(); close();
} }
} }