Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-table-widget@94984 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-04-17 14:44:58 +00:00 committed by Giancarlo Panichi
parent bfc947448f
commit ea37ddcac2
1 changed files with 20 additions and 17 deletions

View File

@ -18,7 +18,7 @@ public class HistoryDiscard {
this.eventBus = eventBus; this.eventBus = eventBus;
} }
public void discard(){ public void discard() {
retrieveCurrentTR(); retrieveCurrentTR();
} }
@ -42,27 +42,30 @@ public class HistoryDiscard {
}); });
} }
protected void callDiscard() {
protected void callDiscard(){ TDGWTServiceAsync.INSTANCE.discard(trId,
TDGWTServiceAsync.INSTANCE.discard(trId, new AsyncCallback<RollBackSession>() { new AsyncCallback<RollBackSession>() {
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
Log.error("Error in discard: " Log.error("Error in discard: "
+ caught.getLocalizedMessage()); + caught.getLocalizedMessage());
UtilsGXT3.alert("Error in discard", UtilsGXT3.alert("Error in discard", "Error in discard");
"Error in discard");
} }
public void onSuccess(RollBackSession result) { public void onSuccess(RollBackSession result) {
Log.debug("Discard started "+result); Log.debug("Discard Session " + result);
if (result == null) {
Log.info("Attention: undo not applicable");
UtilsGXT3.info("Attention", "Undo not applicable");
} else {
callRollBackProgressDialog(result); callRollBackProgressDialog(result);
} }
}
}); });
} }
protected void callRollBackProgressDialog(RollBackSession rollBackSession) { protected void callRollBackProgressDialog(RollBackSession rollBackSession) {
RollBackProgressDialog dialog = new RollBackProgressDialog( RollBackProgressDialog dialog = new RollBackProgressDialog(
rollBackSession, eventBus); rollBackSession, eventBus);