Added SessionExpiredShow

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-table-widget@95793 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-05-16 14:21:10 +00:00 committed by Giancarlo Panichi
parent 5ec8a3d7ac
commit ed0e9fdef3
14 changed files with 890 additions and 783 deletions

View File

@ -1,8 +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.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData;
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.ChangeTableTypeSession;
import org.gcube.portlets.user.td.tablewidget.client.progress.ChangeTableTypeProgressDialog;
@ -10,6 +9,8 @@ import org.gcube.portlets.user.td.tablewidget.client.type.TableTypeElement;
import org.gcube.portlets.user.td.tablewidget.client.type.TableTypeProperties;
import org.gcube.portlets.user.td.tablewidget.client.type.TableTypeStore;
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.allen_sauer.gwt.log.client.Log;
@ -29,14 +30,13 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
import com.sencha.gxt.widget.core.client.form.ComboBox;
import com.sencha.gxt.widget.core.client.form.FieldLabel;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class ChangeTableTypePanel extends FramedPanel {
public class ChangeTableTypePanel extends FramedPanel {
protected String WIDTH = "640px";
protected String HEIGHT = "520px";
@ -51,25 +51,23 @@ public class ChangeTableTypePanel extends FramedPanel {
protected ComboBox<TableTypeElement> comboTableType;
protected TextButton change;
public ChangeTableTypePanel(TRId trId, EventBus eventBus) {
super();
this.trId=trId;
this.trId = trId;
this.eventBus = eventBus;
forceLayoutOnResize=true;
forceLayoutOnResize = true;
create();
}
protected void create(){
protected void create() {
setWidth(WIDTH);
setHeight(HEIGHT);
setHeaderVisible(false);
setBodyBorder(false);
TableTypeProperties props = GWT.create(TableTypeProperties.class);
ListStore<TableTypeElement> storeTableType = new ListStore<TableTypeElement>(props.id());
ListStore<TableTypeElement> storeTableType = new ListStore<TableTypeElement>(
props.id());
storeTableType.addAll(TableTypeStore.getTableTypes());
@ -80,15 +78,13 @@ public class ChangeTableTypePanel extends FramedPanel {
Log.trace("ComboTableType created");
comboTableType.setEmptyText("Select a Table Type...");
comboTableType.setItemId("ComboTableType");
comboTableType.setWidth("200px");
comboTableType.setEditable(false);
comboTableType.setTriggerAction(TriggerAction.ALL);
change=new TextButton("Change");
change = new TextButton("Change");
change.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
@ -101,10 +97,10 @@ public class ChangeTableTypePanel extends FramedPanel {
vl.setScrollMode(ScrollMode.AUTO);
vl.setAdjustForScroll(true);
vl.add(new FieldLabel(comboTableType, "Table Type"), new VerticalLayoutData(1,
-1));
vl.add(change, new VerticalLayoutData(-1, -1, new Margins(10, 0, 10, 0)));
vl.add(new FieldLabel(comboTableType, "Table Type"),
new VerticalLayoutData(1, -1));
vl.add(change,
new VerticalLayoutData(-1, -1, new Margins(10, 0, 10, 0)));
add(vl);
show();
@ -112,10 +108,11 @@ public class ChangeTableTypePanel extends FramedPanel {
}
protected void onChangeTableType(){
protected void onChangeTableType() {
TableTypeElement tableTypeElement = comboTableType.getCurrentValue();
if(tableTypeElement!=null){
changeTableTypeSession=new ChangeTableTypeSession(trId,tableTypeElement.getTableType());
if (tableTypeElement != null) {
changeTableTypeSession = new ChangeTableTypeSession(trId,
tableTypeElement.getTableType());
callChangeTableType();
} else {
UtilsGXT3.alert("Attention", "Select a table type!");
@ -123,46 +120,57 @@ public class ChangeTableTypePanel extends FramedPanel {
}
private void callChangeTableType() {
TDGWTServiceAsync.INSTANCE.startChangeTableType(
changeTableTypeSession, new AsyncCallback<Void>() {
TDGWTServiceAsync.INSTANCE.startChangeTableType(changeTableTypeSession,
new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
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 TDGWTSessionExpiredException) {
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!");
}
}
public void onSuccess(Void result) {
changeTableTypeProgressDialog= new ChangeTableTypeProgressDialog(changeTableTypeSession, eventBus);
changeTableTypeProgressDialog = new ChangeTableTypeProgressDialog(
changeTableTypeSession, eventBus);
}
});
}
protected void setCurrentType(){
TableTypeElement tElement=TableTypeStore.getTableTypeElement(table.getTypeName());
protected void setCurrentType() {
TableTypeElement tElement = TableTypeStore.getTableTypeElement(table
.getTypeName());
comboTableType.setValue(tElement);
}
private void load() {
TDGWTServiceAsync.INSTANCE.getTable(trId,
new AsyncCallback<TableData>() {
public void onFailure(Throwable caught) {
Log.error("Error retrieving table: "
+ caught.getMessage());
UtilsGXT3.alert("Error retrieving table",caught.getMessage());
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
Log.error("Error retrieving table: "
+ caught.getMessage());
UtilsGXT3.alert("Error retrieving table",
caught.getMessage());
}
}
public void onSuccess(TableData result) {
Log.debug("Retrieved table: "+result.toString());
table=result;
Log.debug("Retrieved table: " + result.toString());
table = result;
setCurrentType();
}
@ -171,13 +179,9 @@ public class ChangeTableTypePanel extends FramedPanel {
}
public void update(TRId trId) {
this.trId = trId;
load();
}
}

View File

@ -1,11 +1,14 @@
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.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.clone.CloneTabularResourceSession;
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableWhy;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.allen_sauer.gwt.log.client.Log;
@ -34,24 +37,29 @@ public class CloneTabularResource {
cloneTabularResourceSession, new AsyncCallback<TRId>() {
public void onFailure(Throwable caught) {
Log.debug("Clone Error: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error Cloning Tabular Resource",
"Error in clone operation!");
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
Log.debug("Clone Error: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error Cloning Tabular Resource",
"Error in clone operation!");
}
}
public void onSuccess(TRId result) {
Log.info("TR Clone:"+result);
final ChangeTableRequestEvent event=new ChangeTableRequestEvent(ChangeTableRequestType.CLONETABULARRESOURCE,result,ChangeTableWhy.TABLEUPDATED);
Log.info("TR Clone:" + result);
final ChangeTableRequestEvent event = new ChangeTableRequestEvent(
ChangeTableRequestType.CLONETABULARRESOURCE,
result, ChangeTableWhy.TABLEUPDATED);
eventBus.fireEvent(event);
UtilsGXT3.info("Clone", "Clone Tabular Resource Succed");
UtilsGXT3
.info("Clone", "Clone Tabular Resource Succed");
}
});
}
}

View File

@ -1,9 +1,12 @@
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.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.history.RollBackSession;
import org.gcube.portlets.user.td.tablewidget.client.progress.RollBackProgressDialog;
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.allen_sauer.gwt.log.client.Log;
@ -26,11 +29,15 @@ public class HistoryDiscard {
TDGWTServiceAsync.INSTANCE.getCurrentTRId(new AsyncCallback<TRId>() {
public void onFailure(Throwable caught) {
Log.error("Error retrieving trId: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error",
"Error retrieving current tabular resource id");
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
Log.error("Error retrieving trId: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error",
"Error retrieving current tabular resource id");
}
}
public void onSuccess(TRId result) {
@ -47,10 +54,15 @@ public class HistoryDiscard {
new AsyncCallback<RollBackSession>() {
public void onFailure(Throwable caught) {
Log.error("Error in discard: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error in discard", "Error in discard");
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
Log.error("Error in discard: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error in discard",
"Error in discard");
}
}
public void onSuccess(RollBackSession result) {

View File

@ -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.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.history.OpHistory;
import org.gcube.portlets.user.td.gwtservice.shared.history.RollBackSession;
import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData;
@ -12,6 +13,8 @@ import org.gcube.portlets.user.td.tablewidget.client.progress.RollBackProgressDi
import org.gcube.portlets.user.td.tablewidget.client.properties.OpHistoryProperties;
import org.gcube.portlets.user.td.tablewidget.client.resources.ResourceBundle;
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.allen_sauer.gwt.log.client.Log;
@ -120,8 +123,8 @@ public class HistoryPanel extends FramedPanel {
@Override
public void render(Context context, String value, SafeHtmlBuilder sb) {
sb.appendHtmlConstant("<span title='"+value+"'>"
+ value + "</span>");
sb.appendHtmlConstant("<span title='" + value + "'>" + value
+ "</span>");
}
@ -133,8 +136,6 @@ public class HistoryPanel extends FramedPanel {
ColumnConfig<OpHistory, String> rollBackColumn = new ColumnConfig<OpHistory, String>(
props.date(), 40, "Undo");
ActionButtonCellNoFirst button = new ActionButtonCellNoFirst();
button.setIcon(ResourceBundle.INSTANCE.undo());
button.setTitle("Undo");
@ -151,8 +152,6 @@ public class HistoryPanel extends FramedPanel {
rollBackColumn.setCell(button);
List<ColumnConfig<OpHistory, ?>> l = new ArrayList<ColumnConfig<OpHistory, ?>>();
l.add(expander);
l.add(nameCol);
@ -219,7 +218,7 @@ public class HistoryPanel extends FramedPanel {
protected void startSearchRollBackId(int rowIndex) {
currentRowIndex = rowIndex;
currentOpHistory = store.get(rowIndex-1);
currentOpHistory = store.get(rowIndex - 1);
Log.debug(currentOpHistory.toString() + " was clicked.[rowIndex="
+ currentRowIndex + " ]");
callRollBack();
@ -233,11 +232,15 @@ public class HistoryPanel extends FramedPanel {
new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
Log.error("Error in rollback: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error in rollback",
"Error in rollback");
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
Log.error("Error in rollback: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error in rollback",
"Error in rollback");
}
}
public void onSuccess(Void result) {
@ -262,10 +265,15 @@ public class HistoryPanel extends FramedPanel {
new AsyncCallback<ArrayList<OpHistory>>() {
public void onFailure(Throwable caught) {
Log.error("Error Retrieving History: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving history",
"Error retrieving history");
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
Log.error("Error Retrieving History: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving history",
"Error retrieving history");
}
callback.onFailure(caught);
}
@ -288,11 +296,15 @@ public class HistoryPanel extends FramedPanel {
TDGWTServiceAsync.INSTANCE.getCurrentTRId(new AsyncCallback<TRId>() {
public void onFailure(Throwable caught) {
Log.error("Error retrieving current TRId: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error",
"Error retrieving current tabular resource id");
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
Log.error("Error retrieving current TRId: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error",
"Error retrieving current tabular resource id");
}
}
public void onSuccess(TRId result) {

View File

@ -1,10 +1,13 @@
package org.gcube.portlets.user.td.tablewidget.client.progress;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.ChangeTableTypeSession;
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableWhy;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.allen_sauer.gwt.log.client.Log;
@ -19,125 +22,130 @@ import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.Verti
import com.sencha.gxt.widget.core.client.event.SelectEvent;
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
/**
* LabelColumnProgressDialog is a Dialog that show progress of change the column label
* LabelColumnProgressDialog is a Dialog that show progress of change the column
* label
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class ChangeTableTypeProgressDialog extends Window implements ChangeTableTypeProgressListener {
public static final int STATUS_POLLING_DELAY = 1000;
protected String WIDTH = "400px";
protected String HEIGHT = "120px";
protected ChangeTableTypeSession changeTableTypeSession;
protected EventBus eventBus;
protected ChangeTableTypeProgressUpdater progressUpdater;
protected TextButton ok;
protected TRId trId;
private ChangeTableWhy why;
public class ChangeTableTypeProgressDialog extends Window implements
ChangeTableTypeProgressListener {
public static final int STATUS_POLLING_DELAY = 1000;
protected String WIDTH = "400px";
protected String HEIGHT = "120px";
protected ChangeTableTypeSession changeTableTypeSession;
protected EventBus eventBus;
protected ChangeTableTypeProgressUpdater progressUpdater;
protected TextButton ok;
protected TRId trId;
private ChangeTableWhy why;
public ChangeTableTypeProgressDialog(ChangeTableTypeSession changeTableTypeSession, EventBus eventBus) {
this.changeTableTypeSession=changeTableTypeSession;
this.eventBus=eventBus;
setWidth(WIDTH);
setHeight(HEIGHT);
setBodyBorder(false);
setResizable(true);
setModal(true);
setHeadingText("Change The Table Type Progress");
public ChangeTableTypeProgressDialog(
ChangeTableTypeSession changeTableTypeSession, EventBus eventBus) {
this.changeTableTypeSession = changeTableTypeSession;
this.eventBus = eventBus;
setWidth(WIDTH);
setHeight(HEIGHT);
setBodyBorder(false);
setResizable(true);
setModal(true);
setHeadingText("Change The Table Type Progress");
trId=null;
trId = null;
FramedPanel panel=new FramedPanel();
panel.setHeaderVisible(false);
panel.setBodyBorder(false);
FramedPanel panel = new FramedPanel();
panel.setHeaderVisible(false);
panel.setBodyBorder(false);
VerticalLayoutContainer v = new VerticalLayoutContainer();
VerticalLayoutContainer v = new VerticalLayoutContainer();
ProgressBar progressBar = new ProgressBar();
ProgressBar progressBar = new ProgressBar();
ok = new TextButton("OK");
ok.addSelectHandler(new SelectHandler() {
ok=new TextButton("OK");
ok.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
updateInvocation();
public void onSelect(SelectEvent event) {
updateInvocation();
}
});
v.add(progressBar, new VerticalLayoutData(1,
1, new Margins(5, 5, 5, 5)));
panel.add(v);
panel.addButton(ok);
add(panel);
progressUpdater = new ChangeTableTypeProgressUpdater();
progressUpdater.addListener(new ChangeTableTypeProgressBarUpdater(progressBar));
progressUpdater.addListener(this);
progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY);
show();
ok.setVisible(false);
}
public void operationInitializing() {
// TODO Auto-generated method stub
}
public void operationUpdate(float elaborated) {
// TODO Auto-generated method stub
}
public void operationComplete(TRId trId) {
Log.debug("Operation Complete return: "+trId.toString());
this.trId=trId;
why=ChangeTableWhy.TABLEUPDATED;
updateInvocation();
}
public void operationFailed(Throwable caught, String reason,
String failureDetails) {
ok.setVisible(true);
this.trId=null;
UtilsGXT3.alert("Error Changing The Table Type", reason);
}
public void updateInvocation(){
if(trId!=null){
ChangeTableRequestEvent changeTableRequestEvent=
new ChangeTableRequestEvent(ChangeTableRequestType.CHANGETABLETYPE, trId,why);
eventBus.fireEvent(changeTableRequestEvent);
}
hide();
}
});
@Override
public void operationStopped(TRId trId,String reason, String details) {
Log.debug("Operation Stopped: ["+trId.toString()+", "+reason+", "+details+"]");
v.add(progressBar,
new VerticalLayoutData(1, 1, new Margins(5, 5, 5, 5)));
panel.add(v);
panel.addButton(ok);
add(panel);
progressUpdater = new ChangeTableTypeProgressUpdater();
progressUpdater.addListener(new ChangeTableTypeProgressBarUpdater(
progressBar));
progressUpdater.addListener(this);
progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY);
show();
ok.setVisible(false);
}
public void operationInitializing() {
// TODO Auto-generated method stub
}
public void operationUpdate(float elaborated) {
// TODO Auto-generated method stub
}
public void operationComplete(TRId trId) {
Log.debug("Operation Complete return: " + trId.toString());
this.trId = trId;
why = ChangeTableWhy.TABLEUPDATED;
updateInvocation();
}
public void operationFailed(Throwable caught, String reason,
String failureDetails) {
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
ok.setVisible(true);
this.trId=trId;
why=ChangeTableWhy.TABLECURATION;
this.trId = null;
UtilsGXT3.alert("Error Changing The Table Type", reason);
}
}
@Override
public void operationGeneratingView() {
// TODO Auto-generated method stub
public void updateInvocation() {
if (trId != null) {
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
ChangeTableRequestType.CHANGETABLETYPE, trId, why);
eventBus.fireEvent(changeTableRequestEvent);
}
hide();
}
@Override
public void operationValidate(float elaborated) {
// TODO Auto-generated method stub
@Override
public void operationStopped(TRId trId, String reason, String details) {
Log.debug("Operation Stopped: [" + trId.toString() + ", " + reason
+ ", " + details + "]");
ok.setVisible(true);
this.trId = trId;
why = ChangeTableWhy.TABLECURATION;
}
}
@Override
public void operationGeneratingView() {
// TODO Auto-generated method stub
}
@Override
public void operationValidate(float elaborated) {
// TODO Auto-generated method stub
}
}

View File

@ -1,10 +1,13 @@
package org.gcube.portlets.user.td.tablewidget.client.progress;
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.tablewidget.client.util.UtilsGXT3;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableWhy;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.allen_sauer.gwt.log.client.Log;
@ -19,126 +22,131 @@ import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.Verti
import com.sencha.gxt.widget.core.client.event.SelectEvent;
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
/**
* LabelColumnProgressDialog is a Dialog that show progress of change the column label
* LabelColumnProgressDialog is a Dialog that show progress of change the column
* label
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class DeleteRowsProgressDialog extends Window implements DeleteRowsProgressListener {
public static final int STATUS_POLLING_DELAY = 1000;
protected String WIDTH = "400px";
protected String HEIGHT = "120px";
protected DeleteRowsSession deleteRowsSession;
protected EventBus eventBus;
protected DeleteRowsProgressUpdater progressUpdater;
protected TextButton ok;
protected TRId trId;
private ChangeTableWhy why;
public class DeleteRowsProgressDialog extends Window implements
DeleteRowsProgressListener {
public static final int STATUS_POLLING_DELAY = 1000;
protected String WIDTH = "400px";
protected String HEIGHT = "120px";
protected DeleteRowsSession deleteRowsSession;
protected EventBus eventBus;
protected DeleteRowsProgressUpdater progressUpdater;
protected TextButton ok;
protected TRId trId;
private ChangeTableWhy why;
public DeleteRowsProgressDialog(DeleteRowsSession deleteRowsSession, EventBus eventBus) {
this.deleteRowsSession=deleteRowsSession;
this.eventBus=eventBus;
setWidth(WIDTH);
setHeight(HEIGHT);
setBodyBorder(false);
setResizable(true);
setModal(true);
setHeadingText("Delete Rows Progress");
public DeleteRowsProgressDialog(DeleteRowsSession deleteRowsSession,
EventBus eventBus) {
this.deleteRowsSession = deleteRowsSession;
this.eventBus = eventBus;
setWidth(WIDTH);
setHeight(HEIGHT);
setBodyBorder(false);
setResizable(true);
setModal(true);
setHeadingText("Delete Rows Progress");
trId=null;
trId = null;
FramedPanel panel=new FramedPanel();
panel.setHeaderVisible(false);
panel.setBodyBorder(false);
FramedPanel panel = new FramedPanel();
panel.setHeaderVisible(false);
panel.setBodyBorder(false);
VerticalLayoutContainer v = new VerticalLayoutContainer();
VerticalLayoutContainer v = new VerticalLayoutContainer();
ProgressBar progressBar = new ProgressBar();
ProgressBar progressBar = new ProgressBar();
ok = new TextButton("OK");
ok.addSelectHandler(new SelectHandler() {
ok=new TextButton("OK");
ok.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
updateInvocation();
public void onSelect(SelectEvent event) {
updateInvocation();
}
});
v.add(progressBar, new VerticalLayoutData(1,
1, new Margins(5, 5, 5, 5)));
panel.add(v);
panel.addButton(ok);
add(panel);
progressUpdater = new DeleteRowsProgressUpdater();
progressUpdater.addListener(new DeleteRowsProgressBarUpdater(progressBar));
progressUpdater.addListener(this);
progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY);
show();
ok.setVisible(false);
}
public void operationInitializing() {
// TODO Auto-generated method stub
}
public void operationUpdate(float elaborated) {
// TODO Auto-generated method stub
}
public void operationComplete(TRId trId) {
Log.debug("Operation Complete return: "+trId.toString());
this.trId=trId;
why=ChangeTableWhy.TABLEUPDATED;
updateInvocation();
}
public void operationFailed(Throwable caught, String reason,
String failureDetails) {
ok.setVisible(true);
this.trId=null;
UtilsGXT3.alert("Error Deleting Rows", reason);
}
public void updateInvocation(){
if(trId!=null){
ChangeTableRequestEvent changeTableRequestEvent=
new ChangeTableRequestEvent(ChangeTableRequestType.DELETEROWS, trId, why);
eventBus.fireEvent(changeTableRequestEvent);
}
hide();
}
});
@Override
public void operationStopped(TRId trId,String reason, String details) {
Log.debug("Operation Stopped: ["+trId.toString()+", "+reason+", "+details+"]");
v.add(progressBar,
new VerticalLayoutData(1, 1, new Margins(5, 5, 5, 5)));
panel.add(v);
panel.addButton(ok);
add(panel);
progressUpdater = new DeleteRowsProgressUpdater();
progressUpdater.addListener(new DeleteRowsProgressBarUpdater(
progressBar));
progressUpdater.addListener(this);
progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY);
show();
ok.setVisible(false);
}
public void operationInitializing() {
// TODO Auto-generated method stub
}
public void operationUpdate(float elaborated) {
// TODO Auto-generated method stub
}
public void operationComplete(TRId trId) {
Log.debug("Operation Complete return: " + trId.toString());
this.trId = trId;
why = ChangeTableWhy.TABLEUPDATED;
updateInvocation();
}
public void operationFailed(Throwable caught, String reason,
String failureDetails) {
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
ok.setVisible(true);
this.trId=trId;
why=ChangeTableWhy.TABLECURATION;
this.trId = null;
UtilsGXT3.alert("Error Deleting Rows", reason);
}
}
@Override
public void operationGeneratingView() {
// TODO Auto-generated method stub
public void updateInvocation() {
if (trId != null) {
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
ChangeTableRequestType.DELETEROWS, trId, why);
eventBus.fireEvent(changeTableRequestEvent);
}
hide();
}
@Override
public void operationValidate(float elaborated) {
// TODO Auto-generated method stub
@Override
public void operationStopped(TRId trId, String reason, String details) {
Log.debug("Operation Stopped: [" + trId.toString() + ", " + reason
+ ", " + details + "]");
ok.setVisible(true);
this.trId = trId;
why = ChangeTableWhy.TABLECURATION;
}
}
@Override
public void operationGeneratingView() {
// TODO Auto-generated method stub
}
@Override
public void operationValidate(float elaborated) {
// TODO Auto-generated method stub
}
}

View File

@ -1,10 +1,13 @@
package org.gcube.portlets.user.td.tablewidget.client.progress;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.rows.DuplicatesSession;
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableWhy;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.allen_sauer.gwt.log.client.Log;
@ -19,124 +22,130 @@ import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.Verti
import com.sencha.gxt.widget.core.client.event.SelectEvent;
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
/**
* LabelColumnProgressDialog is a Dialog that show progress of change the column label
* LabelColumnProgressDialog is a Dialog that show progress of change the column
* label
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class DuplicatesRowsProgressDialog extends Window implements DuplicatesRowsProgressListener {
public static final int STATUS_POLLING_DELAY = 1000;
protected String WIDTH = "400px";
protected String HEIGHT = "120px";
protected DuplicatesSession duplicatesSession;
protected EventBus eventBus;
protected DuplicatesRowsProgressUpdater progressUpdater;
protected TextButton ok;
protected TRId trId;
private ChangeTableWhy why;
public class DuplicatesRowsProgressDialog extends Window implements
DuplicatesRowsProgressListener {
public static final int STATUS_POLLING_DELAY = 1000;
protected String WIDTH = "400px";
protected String HEIGHT = "120px";
protected DuplicatesSession duplicatesSession;
protected EventBus eventBus;
protected DuplicatesRowsProgressUpdater progressUpdater;
protected TextButton ok;
protected TRId trId;
private ChangeTableWhy why;
public DuplicatesRowsProgressDialog(DuplicatesSession duplicatesSession, EventBus eventBus) {
this.duplicatesSession=duplicatesSession;
this.eventBus=eventBus;
setWidth(WIDTH);
setHeight(HEIGHT);
setBodyBorder(false);
setResizable(true);
setModal(true);
setHeadingText("Duplicates Rows Progress");
public DuplicatesRowsProgressDialog(DuplicatesSession duplicatesSession,
EventBus eventBus) {
this.duplicatesSession = duplicatesSession;
this.eventBus = eventBus;
setWidth(WIDTH);
setHeight(HEIGHT);
setBodyBorder(false);
setResizable(true);
setModal(true);
setHeadingText("Duplicates Rows Progress");
trId=null;
trId = null;
FramedPanel panel=new FramedPanel();
panel.setHeaderVisible(false);
panel.setBodyBorder(false);
FramedPanel panel = new FramedPanel();
panel.setHeaderVisible(false);
panel.setBodyBorder(false);
VerticalLayoutContainer v = new VerticalLayoutContainer();
VerticalLayoutContainer v = new VerticalLayoutContainer();
ProgressBar progressBar = new ProgressBar();
ProgressBar progressBar = new ProgressBar();
ok = new TextButton("OK");
ok.addSelectHandler(new SelectHandler() {
ok=new TextButton("OK");
ok.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
updateInvocation();
public void onSelect(SelectEvent event) {
updateInvocation();
}
});
}
});
v.add(progressBar,
new VerticalLayoutData(1, 1, new Margins(5, 5, 5, 5)));
v.add(progressBar, new VerticalLayoutData(1,
1, new Margins(5, 5, 5, 5)));
panel.add(v);
panel.addButton(ok);
add(panel);
panel.add(v);
panel.addButton(ok);
add(panel);
progressUpdater = new DuplicatesRowsProgressUpdater();
progressUpdater.addListener(new DuplicatesRowsProgressBarUpdater(
progressBar));
progressUpdater.addListener(this);
progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY);
show();
ok.setVisible(false);
progressUpdater = new DuplicatesRowsProgressUpdater();
progressUpdater.addListener(new DuplicatesRowsProgressBarUpdater(progressBar));
}
progressUpdater.addListener(this);
progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY);
show();
ok.setVisible(false);
public void operationInitializing() {
// TODO Auto-generated method stub
}
}
public void operationInitializing() {
// TODO Auto-generated method stub
public void operationUpdate(float elaborated) {
// TODO Auto-generated method stub
}
}
public void operationUpdate(float elaborated) {
// TODO Auto-generated method stub
public void operationComplete(TRId trId) {
Log.debug("Operation Complete return: " + trId.toString());
this.trId = trId;
why = ChangeTableWhy.TABLEUPDATED;
updateInvocation();
}
}
public void operationComplete(TRId trId) {
Log.debug("Operation Complete return: "+trId.toString());
this.trId=trId;
why=ChangeTableWhy.TABLEUPDATED;
updateInvocation();
}
public void operationFailed(Throwable caught, String reason,
String failureDetails) {
public void operationFailed(Throwable caught, String reason,
String failureDetails) {
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
ok.setVisible(true);
this.trId=null;
this.trId = null;
UtilsGXT3.alert("Error Deleting Rows", reason);
}
}
public void updateInvocation(){
if(trId!=null){
ChangeTableRequestEvent changeTableRequestEvent=
new ChangeTableRequestEvent(ChangeTableRequestType.DUPLICATES, trId,why);
eventBus.fireEvent(changeTableRequestEvent);
}
hide();
public void updateInvocation() {
if (trId != null) {
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
ChangeTableRequestType.DUPLICATES, trId, why);
eventBus.fireEvent(changeTableRequestEvent);
}
hide();
}
@Override
public void operationStopped(TRId trId,String reason, String details) {
Log.debug("Operation Stopped: ["+trId.toString()+", "+reason+", "+details+"]");
ok.setVisible(true);
this.trId=trId;
why=ChangeTableWhy.TABLECURATION;
}
@Override
public void operationStopped(TRId trId, String reason, String details) {
Log.debug("Operation Stopped: [" + trId.toString() + ", " + reason
+ ", " + details + "]");
ok.setVisible(true);
this.trId = trId;
why = ChangeTableWhy.TABLECURATION;
}
@Override
public void operationGeneratingView() {
// TODO Auto-generated method stub
@Override
public void operationGeneratingView() {
// TODO Auto-generated method stub
}
}
@Override
public void operationValidate(float elaborated) {
// TODO Auto-generated method stub
@Override
public void operationValidate(float elaborated) {
// TODO Auto-generated method stub
}
}
}

View File

@ -1,10 +1,13 @@
package org.gcube.portlets.user.td.tablewidget.client.progress;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.tablewidget.client.rows.EditRowPanel;
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableWhy;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.allen_sauer.gwt.log.client.Log;
@ -22,121 +25,125 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
/**
*
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class EditRowProgressDialog extends Window implements EditRowProgressListener {
public static final int STATUS_POLLING_DELAY = 1000;
protected String WIDTH = "400px";
protected String HEIGHT = "120px";
protected EditRowPanel parent;
protected EventBus eventBus;
protected EditRowProgressUpdater progressUpdater;
protected TextButton ok;
protected TRId trId;
private ChangeTableWhy why;
public class EditRowProgressDialog extends Window implements
EditRowProgressListener {
public static final int STATUS_POLLING_DELAY = 1000;
protected String WIDTH = "400px";
protected String HEIGHT = "120px";
protected EditRowPanel parent;
protected EventBus eventBus;
protected EditRowProgressUpdater progressUpdater;
protected TextButton ok;
protected TRId trId;
private ChangeTableWhy why;
public EditRowProgressDialog(EditRowPanel editRowPanel, EventBus eventBus) {
this.parent=editRowPanel;
this.eventBus=eventBus;
setWidth(WIDTH);
setHeight(HEIGHT);
setBodyBorder(false);
setResizable(true);
setModal(true);
setHeadingText("Rollback Progress");
public EditRowProgressDialog(EditRowPanel editRowPanel, EventBus eventBus) {
this.parent = editRowPanel;
this.eventBus = eventBus;
setWidth(WIDTH);
setHeight(HEIGHT);
setBodyBorder(false);
setResizable(true);
setModal(true);
setHeadingText("Rollback Progress");
trId=null;
trId = null;
FramedPanel panel=new FramedPanel();
panel.setHeaderVisible(false);
panel.setBodyBorder(false);
FramedPanel panel = new FramedPanel();
panel.setHeaderVisible(false);
panel.setBodyBorder(false);
VerticalLayoutContainer v = new VerticalLayoutContainer();
VerticalLayoutContainer v = new VerticalLayoutContainer();
ProgressBar progressBar = new ProgressBar();
ProgressBar progressBar = new ProgressBar();
ok = new TextButton("OK");
ok.addSelectHandler(new SelectHandler() {
ok=new TextButton("OK");
ok.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
updateInvocation();
public void onSelect(SelectEvent event) {
updateInvocation();
}
});
v.add(progressBar, new VerticalLayoutData(1,
1, new Margins(5, 5, 5, 5)));
panel.add(v);
panel.addButton(ok);
add(panel);
progressUpdater = new EditRowProgressUpdater();
progressUpdater.addListener(new EditRowProgressBarUpdater(progressBar));
progressUpdater.addListener(this);
progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY);
show();
ok.setVisible(false);
}
public void operationInitializing() {
// TODO Auto-generated method stub
}
public void operationUpdate(float elaborated) {
// TODO Auto-generated method stub
}
public void operationComplete(TRId trId) {
Log.debug("Operation Complete return: "+trId.toString());
this.trId=trId;
why=ChangeTableWhy.TABLEUPDATED;
updateInvocation();
}
public void operationFailed(Throwable caught, String reason,
String failureDetails) {
ok.setVisible(true);
this.trId=null;
UtilsGXT3.alert("Error", reason);
}
public void updateInvocation(){
if(trId!=null){
ChangeTableRequestEvent changeTableRequestEvent=
new ChangeTableRequestEvent(ChangeTableRequestType.EDITROW, trId,why);
eventBus.fireEvent(changeTableRequestEvent);
}
parent.close();
hide();
}
});
@Override
public void operationStopped(TRId trId,String reason, String details) {
Log.debug("Operation Stopped: ["+trId.toString()+", "+reason+", "+details+"]");
v.add(progressBar,
new VerticalLayoutData(1, 1, new Margins(5, 5, 5, 5)));
panel.add(v);
panel.addButton(ok);
add(panel);
progressUpdater = new EditRowProgressUpdater();
progressUpdater.addListener(new EditRowProgressBarUpdater(progressBar));
progressUpdater.addListener(this);
progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY);
show();
ok.setVisible(false);
}
public void operationInitializing() {
// TODO Auto-generated method stub
}
public void operationUpdate(float elaborated) {
// TODO Auto-generated method stub
}
public void operationComplete(TRId trId) {
Log.debug("Operation Complete return: " + trId.toString());
this.trId = trId;
why = ChangeTableWhy.TABLEUPDATED;
updateInvocation();
}
public void operationFailed(Throwable caught, String reason,
String failureDetails) {
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
ok.setVisible(true);
this.trId=trId;
why=ChangeTableWhy.TABLECURATION;
this.trId = null;
UtilsGXT3.alert("Error", reason);
}
}
@Override
public void operationGeneratingView() {
// TODO Auto-generated method stub
public void updateInvocation() {
if (trId != null) {
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
ChangeTableRequestType.EDITROW, trId, why);
eventBus.fireEvent(changeTableRequestEvent);
}
parent.close();
hide();
}
@Override
public void operationValidate(float elaborated) {
// TODO Auto-generated method stub
@Override
public void operationStopped(TRId trId, String reason, String details) {
Log.debug("Operation Stopped: [" + trId.toString() + ", " + reason
+ ", " + details + "]");
ok.setVisible(true);
this.trId = trId;
why = ChangeTableWhy.TABLECURATION;
}
}
@Override
public void operationGeneratingView() {
// TODO Auto-generated method stub
}
@Override
public void operationValidate(float elaborated) {
// TODO Auto-generated method stub
}
}

View File

@ -1,10 +1,13 @@
package org.gcube.portlets.user.td.tablewidget.client.progress;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.history.RollBackSession;
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableWhy;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.allen_sauer.gwt.log.client.Log;
@ -22,120 +25,126 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
/**
*
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class RollBackProgressDialog extends Window implements RollBackProgressListener {
public static final int STATUS_POLLING_DELAY = 1000;
protected String WIDTH = "400px";
protected String HEIGHT = "120px";
protected RollBackSession rollBackSession;
protected EventBus eventBus;
protected RollBackProgressUpdater progressUpdater;
protected TextButton ok;
protected TRId trId;
private ChangeTableWhy why;
public class RollBackProgressDialog extends Window implements
RollBackProgressListener {
public static final int STATUS_POLLING_DELAY = 1000;
protected String WIDTH = "400px";
protected String HEIGHT = "120px";
protected RollBackSession rollBackSession;
protected EventBus eventBus;
protected RollBackProgressUpdater progressUpdater;
protected TextButton ok;
protected TRId trId;
private ChangeTableWhy why;
public RollBackProgressDialog(RollBackSession rollBackSession, EventBus eventBus) {
this.rollBackSession=rollBackSession;
this.eventBus=eventBus;
setWidth(WIDTH);
setHeight(HEIGHT);
setBodyBorder(false);
setResizable(true);
setModal(true);
setHeadingText("Rollback Progress");
public RollBackProgressDialog(RollBackSession rollBackSession,
EventBus eventBus) {
this.rollBackSession = rollBackSession;
this.eventBus = eventBus;
setWidth(WIDTH);
setHeight(HEIGHT);
setBodyBorder(false);
setResizable(true);
setModal(true);
setHeadingText("Rollback Progress");
trId=null;
trId = null;
FramedPanel panel=new FramedPanel();
panel.setHeaderVisible(false);
panel.setBodyBorder(false);
FramedPanel panel = new FramedPanel();
panel.setHeaderVisible(false);
panel.setBodyBorder(false);
VerticalLayoutContainer v = new VerticalLayoutContainer();
VerticalLayoutContainer v = new VerticalLayoutContainer();
ProgressBar progressBar = new ProgressBar();
ProgressBar progressBar = new ProgressBar();
ok = new TextButton("OK");
ok.addSelectHandler(new SelectHandler() {
ok=new TextButton("OK");
ok.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
updateInvocation();
public void onSelect(SelectEvent event) {
updateInvocation();
}
});
v.add(progressBar, new VerticalLayoutData(1,
1, new Margins(5, 5, 5, 5)));
panel.add(v);
panel.addButton(ok);
add(panel);
progressUpdater = new RollBackProgressUpdater();
progressUpdater.addListener(new RollBackProgressBarUpdater(progressBar));
progressUpdater.addListener(this);
progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY);
show();
ok.setVisible(false);
}
public void operationInitializing() {
// TODO Auto-generated method stub
}
public void operationUpdate(float elaborated) {
// TODO Auto-generated method stub
}
public void operationComplete(TRId trId) {
Log.debug("Operation Complete return: "+trId.toString());
this.trId=trId;
why=ChangeTableWhy.TABLEUPDATED;
updateInvocation();
}
public void operationFailed(Throwable caught, String reason,
String failureDetails) {
ok.setVisible(true);
this.trId=null;
UtilsGXT3.alert("Error in RollBack", reason);
}
public void updateInvocation(){
if(trId!=null){
ChangeTableRequestEvent changeTableRequestEvent=
new ChangeTableRequestEvent(ChangeTableRequestType.DELETEROWS, trId,why);
eventBus.fireEvent(changeTableRequestEvent);
}
hide();
}
});
@Override
public void operationStopped(TRId trId,String reason, String details) {
Log.debug("Operation Stopped: ["+trId.toString()+", "+reason+", "+details+"]");
v.add(progressBar,
new VerticalLayoutData(1, 1, new Margins(5, 5, 5, 5)));
panel.add(v);
panel.addButton(ok);
add(panel);
progressUpdater = new RollBackProgressUpdater();
progressUpdater
.addListener(new RollBackProgressBarUpdater(progressBar));
progressUpdater.addListener(this);
progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY);
show();
ok.setVisible(false);
}
public void operationInitializing() {
// TODO Auto-generated method stub
}
public void operationUpdate(float elaborated) {
// TODO Auto-generated method stub
}
public void operationComplete(TRId trId) {
Log.debug("Operation Complete return: " + trId.toString());
this.trId = trId;
why = ChangeTableWhy.TABLEUPDATED;
updateInvocation();
}
public void operationFailed(Throwable caught, String reason,
String failureDetails) {
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
ok.setVisible(true);
this.trId=trId;
why=ChangeTableWhy.TABLECURATION;
this.trId = null;
UtilsGXT3.alert("Error in RollBack", reason);
}
}
@Override
public void operationGeneratingView() {
// TODO Auto-generated method stub
public void updateInvocation() {
if (trId != null) {
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
ChangeTableRequestType.DELETEROWS, trId, why);
eventBus.fireEvent(changeTableRequestEvent);
}
hide();
}
@Override
public void operationValidate(float elaborated) {
// TODO Auto-generated method stub
@Override
public void operationStopped(TRId trId, String reason, String details) {
Log.debug("Operation Stopped: [" + trId.toString() + ", " + reason
+ ", " + details + "]");
ok.setVisible(true);
this.trId = trId;
why = ChangeTableWhy.TABLECURATION;
}
}
@Override
public void operationGeneratingView() {
// TODO Auto-generated method stub
}
@Override
public void operationValidate(float elaborated) {
// TODO Auto-generated method stub
}
}

View File

@ -3,9 +3,12 @@ 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.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.rows.DeleteRowsSession;
import org.gcube.portlets.user.td.tablewidget.client.progress.DeleteRowsProgressDialog;
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.allen_sauer.gwt.log.client.Log;
@ -23,39 +26,43 @@ public class DeleteRows {
protected EventBus eventBus;
protected ArrayList<String> rows;
protected DeleteRowsSession deleteRowsSession;
protected DeleteRowsProgressDialog deleteRowsProgressDialog;
protected DeleteRowsProgressDialog deleteRowsProgressDialog;
public DeleteRows(TRId trId, ArrayList<String> rows,EventBus eventBus) {
public DeleteRows(TRId trId, ArrayList<String> rows, EventBus eventBus) {
this.trId = trId;
this.rows=rows;
this.rows = rows;
this.eventBus = eventBus;
}
public void delete(){
deleteRowsSession =new DeleteRowsSession(trId, rows);
public void delete() {
deleteRowsSession = new DeleteRowsSession(trId, rows);
onDelete();
}
protected void onDelete(){
TDGWTServiceAsync.INSTANCE.startDeleteRows(
deleteRowsSession, new AsyncCallback<Void>() {
protected void onDelete() {
TDGWTServiceAsync.INSTANCE.startDeleteRows(deleteRowsSession,
new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
public void onFailure(Throwable caught) {
if (caught instanceof TDGWTSessionExpiredException) {
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!");
UtilsGXT3
.alert("Error Deleting Rows",
"Error in invocation Delete Rows operation!");
}
}
public void onSuccess(Void result) {
deleteRowsProgressDialog= new DeleteRowsProgressDialog(deleteRowsSession, eventBus);
}
});
public void onSuccess(Void result) {
deleteRowsProgressDialog = new DeleteRowsProgressDialog(
deleteRowsSession, eventBus);
}
});
}
}

View File

@ -4,11 +4,14 @@ 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.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.gwtservice.shared.tr.rows.DuplicatesSession;
import org.gcube.portlets.user.td.tablewidget.client.progress.DuplicatesRowsProgressDialog;
import org.gcube.portlets.user.td.tablewidget.client.properties.ColumnDataProperties;
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.allen_sauer.gwt.log.client.Log;
@ -115,11 +118,11 @@ public class DuplicatesRowsPanel extends FramedPanel {
sm.setSelectionMode(SelectionMode.MULTI);
grid.setLoader(loader);
grid.setSelectionModel(sm);
//grid.getView().setAutoExpandColumn(labelCol);
// grid.getView().setAutoExpandColumn(labelCol);
grid.setHeight(360);
grid.getView().setStripeRows(true);
grid.getView().setColumnLines(true);
grid.getView().setAutoFill(true);
grid.getView().setAutoFill(true);
grid.setBorders(false);
grid.setLoadMask(true);
grid.setColumnReordering(true);
@ -147,20 +150,18 @@ public class DuplicatesRowsPanel extends FramedPanel {
};
validatesButton.addSelectHandler(validatesHandler);
FieldLabel columnsLabel = new FieldLabel(null, "Columns");
columnsLabel.getElement().applyStyles("font-weight:bold");
HBoxLayoutContainer hBox=new HBoxLayoutContainer();
hBox.add(validatesButton, new BoxLayoutData(new Margins(2,5,2,5)));
hBox.add(deleteButton,new BoxLayoutData(new Margins(2,5,2,5)));
HBoxLayoutContainer hBox = new HBoxLayoutContainer();
hBox.add(validatesButton, new BoxLayoutData(new Margins(2, 5, 2, 5)));
hBox.add(deleteButton, new BoxLayoutData(new Margins(2, 5, 2, 5)));
VerticalLayoutContainer v = new VerticalLayoutContainer();
v.setScrollMode(ScrollMode.AUTO);
v.add(columnsLabel, new VerticalLayoutData(-1, -1, new Margins(2,1,5,1)));
v.add(columnsLabel, new VerticalLayoutData(-1, -1, new Margins(2, 1, 5,
1)));
v.add(grid, new VerticalLayoutData(1, -1, new Margins(0)));
v.add(hBox, new VerticalLayoutData(-1, -1, new Margins(10, 0,
10, 0)));
v.add(hBox, new VerticalLayoutData(-1, -1, new Margins(10, 0, 10, 0)));
add(v, new VerticalLayoutData(-1, -1, new Margins(0)));
}
@ -182,10 +183,15 @@ public class DuplicatesRowsPanel extends FramedPanel {
new AsyncCallback<ArrayList<ColumnData>>() {
public void onFailure(Throwable caught) {
Log.error("load columns failure:"
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving columns",
"Error retrieving columns");
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
Log.error("load columns failure:"
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving columns",
"Error retrieving columns");
}
callback.onFailure(caught);
}
@ -201,10 +207,9 @@ public class DuplicatesRowsPanel extends FramedPanel {
}
protected void onDeleteDuplicate() {
ArrayList<ColumnData> col=getSelectedItems();
if(col==null||col.size()<1){
UtilsGXT3.alert("Attention",
"Attention no column selected!");
ArrayList<ColumnData> col = getSelectedItems();
if (col == null || col.size() < 1) {
UtilsGXT3.alert("Attention", "Attention no column selected!");
return;
}
duplicatesSession = new DuplicatesSession(trId, col,
@ -214,11 +219,16 @@ public class DuplicatesRowsPanel extends FramedPanel {
new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
Log.debug("Delete Duplicates Error: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error Deleting Rows",
"Error in invocation Delete Duplicates operation!");
if (caught instanceof TDGWTSessionExpiredException) {
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!");
}
}
public void onSuccess(Void result) {
@ -230,12 +240,10 @@ public class DuplicatesRowsPanel extends FramedPanel {
}
protected void onValidatesDuplicate() {
ArrayList<ColumnData> col=getSelectedItems();
if(col==null||col.size()<1){
UtilsGXT3.alert("Attention",
"Attention no column selected!");
ArrayList<ColumnData> col = getSelectedItems();
if (col == null || col.size() < 1) {
UtilsGXT3.alert("Attention", "Attention no column selected!");
return;
}
duplicatesSession = new DuplicatesSession(trId, col,
@ -245,11 +253,16 @@ public class DuplicatesRowsPanel extends FramedPanel {
new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
Log.debug("Validates Duplicates Error: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error Deleting Rows",
"Error in invocation Validates Duplicates operation!");
if (caught instanceof TDGWTSessionExpiredException) {
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!");
}
}
public void onSuccess(Void result) {
@ -261,7 +274,4 @@ public class DuplicatesRowsPanel extends FramedPanel {
}
}

View File

@ -15,6 +15,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.rows.EditRowSession;
import org.gcube.portlets.user.td.tablewidget.client.progress.EditRowProgressDialog;
import org.gcube.portlets.user.td.tablewidget.client.resources.ResourceBundle;
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.CellData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.grid.model.RowRaw;
@ -195,11 +197,15 @@ public class EditRowPanel extends FramedPanel {
new AsyncCallback<ArrayList<ColumnData>>() {
public void onFailure(Throwable caught) {
Log.error("load columns failure:"
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving columns",
"Error retrieving columns");
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
Log.error("load columns failure:"
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error retrieving columns",
"Error retrieving columns");
}
}
public void onSuccess(ArrayList<ColumnData> result) {
@ -588,31 +594,29 @@ public class EditRowPanel extends FramedPanel {
}
}
protected void callEditRow(EditRowSession editRowSession) {
final EditRowPanel panel=this;
final EditRowPanel panel = this;
TDGWTServiceAsync.INSTANCE.startEditRow(editRowSession,new AsyncCallback<Void>() {
TDGWTServiceAsync.INSTANCE.startEditRow(editRowSession,
new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
Log.debug("EditRow: "
+ caught.getLocalizedMessage());
if(caught instanceof TDGWTSessionExpiredException){
UtilsGXT3.alert("Attention",caught.getLocalizedMessage());
} else {
UtilsGXT3.alert("Error",
"Error in operation invocation!");
}
}
public void onFailure(Throwable caught) {
Log.debug("EditRow: " + caught.getLocalizedMessage());
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
UtilsGXT3.alert("Error",
"Error in operation invocation!");
}
}
public void onSuccess(Void result) {
editRowProgressDialog = new EditRowProgressDialog(
panel, eventBus);
}
public void onSuccess(Void result) {
editRowProgressDialog = new EditRowProgressDialog(
panel, eventBus);
}
});
});
}

View File

@ -4,12 +4,15 @@ 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.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData;
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.Validations;
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata.TabValidationsMetadata;
import org.gcube.portlets.user.td.tablewidget.client.properties.ValidationsProperties;
import org.gcube.portlets.user.td.tablewidget.client.resources.ResourceBundle;
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.allen_sauer.gwt.log.client.Log;
@ -63,7 +66,6 @@ public class ValidationsTablePanel extends FramedPanel {
}
public ValidationsTablePanel(TRId trId, EventBus eventBus) {
super();
this.trId = trId;
@ -95,14 +97,13 @@ public class ValidationsTablePanel extends FramedPanel {
@Override
public void render(Context context, String value, SafeHtmlBuilder sb) {
sb.appendHtmlConstant("<span title='"+value+"'>"
+ value + "</span>");
sb.appendHtmlConstant("<span title='" + value + "'>" + value
+ "</span>");
}
});
ColumnConfig<Validations, Boolean> validCol = new ColumnConfig<Validations, Boolean>(
props.valid(), 28, "Valid");
validCol.setCell(new AbstractCell<Boolean>() {
@ -176,7 +177,6 @@ public class ValidationsTablePanel extends FramedPanel {
grid.getView().setAutoExpandColumn(descriptionCol);
grid.getView().setEmptyText("No validation");
add(grid, new MarginData(0));
onResize();
@ -190,11 +190,16 @@ public class ValidationsTablePanel extends FramedPanel {
new AsyncCallback<TabValidationsMetadata>() {
public void onFailure(Throwable caught) {
Log.error("Load validations metadata failure: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert(
"Error retrieving validations metadata",
"Error retrieving validations metadata");
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
Log.error("Load validations metadata failure: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert(
"Error retrieving validations metadata",
"Error retrieving validations metadata");
}
callback.onFailure(caught);
}
@ -218,28 +223,29 @@ public class ValidationsTablePanel extends FramedPanel {
}
public void update() {
retrieveCurrentTR();
loader.load();
}
public void update(TRId trId) {
this.trId=trId;
this.trId = trId;
loader.load();
}
protected void retrieveCurrentTR() {
TDGWTServiceAsync.INSTANCE.getCurrentTRId(new AsyncCallback<TRId>() {
public void onFailure(Throwable caught) {
Log.error("Error retrieving current TRId: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error",
"Error retrieving current tabular resource id");
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
Log.error("Error retrieving current TRId: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error",
"Error retrieving current tabular resource id");
}
}
public void onSuccess(TRId result) {
@ -254,5 +260,4 @@ public class ValidationsTablePanel extends FramedPanel {
});
}
}

View File

@ -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.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.task.ValidationsTasksMetadata;
import org.gcube.portlets.user.td.tablewidget.client.resources.ResourceBundle;
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
@ -11,6 +12,8 @@ import org.gcube.portlets.user.td.tablewidget.client.validation.tree.BaseDto;
import org.gcube.portlets.user.td.tablewidget.client.validation.tree.FolderDto;
import org.gcube.portlets.user.td.tablewidget.client.validation.tree.TreeDataGenerator;
import org.gcube.portlets.user.td.tablewidget.client.validation.tree.ValidationDto;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.sencha.gxt.widget.core.client.event.CollapseItemEvent.CollapseItemHandler;
import com.allen_sauer.gwt.log.client.Log;
@ -108,7 +111,7 @@ public class ValidationsTasksPanel extends FramedPanel {
protected void create() {
con = new VerticalLayoutContainer();
con.setScrollMode(ScrollMode.AUTO);
//con.setAdjustForScroll(true);
// con.setAdjustForScroll(true);
store = new TreeStore<BaseDto>(new KeyProvider());
@ -214,7 +217,6 @@ public class ValidationsTasksPanel extends FramedPanel {
tree.setColumnResize(true);
tree.getView().setAutoExpandColumn(cc1);
IconProvider<BaseDto> iconProvider = new IconProvider<BaseDto>() {
@Override
@ -257,7 +259,6 @@ public class ValidationsTasksPanel extends FramedPanel {
}
});
ToolBar toolBar = new ToolBar();
TextButton btnExpandAll = new TextButton();
@ -274,7 +275,6 @@ public class ValidationsTasksPanel extends FramedPanel {
});
toolBar.add(btnExpandAll);
TextButton btnCollapseAll = new TextButton();
// btnReload.setText("Expand All");
btnCollapseAll.setIcon(ResourceBundle.INSTANCE.expandAll12());
@ -289,14 +289,10 @@ public class ValidationsTasksPanel extends FramedPanel {
});
toolBar.add(btnCollapseAll);
con.add(toolBar, new VerticalLayoutData(1, -1));
con.add(tree, new VerticalLayoutData(1, -1));
add(con,new MarginData(0));
add(con, new MarginData(0));
}
@ -306,12 +302,16 @@ public class ValidationsTasksPanel extends FramedPanel {
new AsyncCallback<ValidationsTasksMetadata>() {
public void onFailure(Throwable caught) {
Log.error("Load validations metadata failure: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert(
"Error retrieving validations metadata",
"Error retrieving validations metadata");
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
Log.error("Load validations metadata failure: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert(
"Error retrieving validations metadata",
"Error retrieving validations metadata");
}
}
public void onSuccess(ValidationsTasksMetadata result) {
@ -338,11 +338,15 @@ public class ValidationsTasksPanel extends FramedPanel {
TDGWTServiceAsync.INSTANCE.getCurrentTRId(new AsyncCallback<TRId>() {
public void onFailure(Throwable caught) {
Log.error("Error retrieving current TRId: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error",
"Error retrieving current tabular resource id");
if (caught instanceof TDGWTSessionExpiredException) {
eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
Log.error("Error retrieving current TRId: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error",
"Error retrieving current tabular resource id");
}
}
public void onSuccess(TRId result) {