Added SessionExpiredShow
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-information-widget@95791 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
3cb2f887ed
commit
88ac6d02f2
|
@ -3,13 +3,16 @@ package org.gcube.portlets.user.td.informationwidget.client;
|
|||
import java.util.HashMap;
|
||||
|
||||
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.TabResource;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData;
|
||||
import org.gcube.portlets.user.td.informationwidget.client.resources.ResourceBundle;
|
||||
import org.gcube.portlets.user.td.informationwidget.client.util.InfoMessageBox;
|
||||
import org.gcube.portlets.user.td.metadatawidget.client.TRMetadataAccordionPanel;
|
||||
import org.gcube.portlets.user.td.metadatawidget.client.TableMetadataAccordionPanel;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.WidgetRequestEvent;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.WidgetRequestType;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||
|
||||
|
@ -230,6 +233,10 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
}
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
AlertMessageBox d = new AlertMessageBox("Error",
|
||||
"Error retrienving properties: "
|
||||
+ caught.getLocalizedMessage());
|
||||
|
@ -242,7 +249,7 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
|
||||
});
|
||||
d.show();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -259,6 +266,10 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
}
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
AlertMessageBox d = new AlertMessageBox("Error",
|
||||
"Error retrienving Last Table: "
|
||||
+ caught.getLocalizedMessage());
|
||||
|
@ -271,7 +282,7 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
|
||||
});
|
||||
d.show();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -309,12 +320,17 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
new AsyncCallback<Void>() {
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.debug("Error Setting Tabular Resoruce Properties: "
|
||||
+ caught.getLocalizedMessage());
|
||||
alert("Error",
|
||||
"Error setting tabular resource properties");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(Void result) {
|
||||
Log.debug("Tabular Resource properties are set: "
|
||||
|
|
Loading…
Reference in New Issue