Added Pending Tasks Retrieve
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@111472 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
dc69fd5c25
commit
d7c81e924d
|
@ -128,6 +128,7 @@ public class TabularDataController {
|
|||
eventBus = new SimpleEventBus();
|
||||
callHello();
|
||||
checkSession();
|
||||
pendingTasksRetrieve();
|
||||
bindToEvents();
|
||||
}
|
||||
|
||||
|
@ -197,6 +198,32 @@ public class TabularDataController {
|
|||
});
|
||||
|
||||
}
|
||||
|
||||
private void pendingTasksRetrieve() {
|
||||
TDGWTServiceAsync.INSTANCE.pendingTasksRetrieve(new AsyncCallback<Integer>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
Log.info("No valid user found: " + caught.getMessage());
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
UtilsGXT3.alert("Error", "Expired Session");
|
||||
sessionExpiredShowDelayed();
|
||||
} else {
|
||||
UtilsGXT3.alert("Error", caught.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Integer pending) {
|
||||
Log.info("Pending Tasks Retrieved: "+pending);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void sessionExpiredShowDelayed() {
|
||||
Timer timeoutTimer = new Timer() {
|
||||
|
|
Loading…
Reference in New Issue