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:
parent
bfc947448f
commit
ea37ddcac2
|
@ -13,15 +13,15 @@ import com.google.web.bindery.event.shared.EventBus;
|
|||
public class HistoryDiscard {
|
||||
protected TRId trId;
|
||||
protected EventBus eventBus;
|
||||
|
||||
|
||||
public HistoryDiscard(EventBus eventBus) {
|
||||
this.eventBus = eventBus;
|
||||
}
|
||||
|
||||
public void discard(){
|
||||
retrieveCurrentTR();
|
||||
|
||||
public void discard() {
|
||||
retrieveCurrentTR();
|
||||
}
|
||||
|
||||
|
||||
protected void retrieveCurrentTR() {
|
||||
TDGWTServiceAsync.INSTANCE.getCurrentTRId(new AsyncCallback<TRId>() {
|
||||
|
||||
|
@ -41,33 +41,36 @@ public class HistoryDiscard {
|
|||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
protected void callDiscard(){
|
||||
TDGWTServiceAsync.INSTANCE.discard(trId, new AsyncCallback<RollBackSession>() {
|
||||
|
||||
protected void callDiscard() {
|
||||
TDGWTServiceAsync.INSTANCE.discard(trId,
|
||||
new AsyncCallback<RollBackSession>() {
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
Log.error("Error in discard: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error in discard",
|
||||
"Error in discard");
|
||||
|
||||
UtilsGXT3.alert("Error in discard", "Error in discard");
|
||||
|
||||
}
|
||||
|
||||
public void onSuccess(RollBackSession result) {
|
||||
Log.debug("Discard started "+result);
|
||||
callRollBackProgressDialog(result);
|
||||
Log.debug("Discard Session " + result);
|
||||
if (result == null) {
|
||||
Log.info("Attention: undo not applicable");
|
||||
UtilsGXT3.info("Attention", "Undo not applicable");
|
||||
} else {
|
||||
callRollBackProgressDialog(result);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void callRollBackProgressDialog(RollBackSession rollBackSession) {
|
||||
RollBackProgressDialog dialog = new RollBackProgressDialog(
|
||||
rollBackSession, eventBus);
|
||||
dialog.show();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue