actionPanel.setSize("100%", "100%");
if (caught.getStatusCode() == ServerException.INVALID_SESSION) {
content.add(new HTML("Server connection failed <br/>Code : " + caught.getStatusCode() + "<br/>" + "Cause : " + caught.getMessage()));
final Anchor reloadAnchor = new Anchor("reload");
reloadAnchor.addClickHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
History.newItem("");
PonySDK.reload();
}
});
actionPanel.add(reloadAnchor);
actionPanel.setCellHorizontalAlignment(reloadAnchor, HasHorizontalAlignment.ALIGN_CENTER);
actionPanel.setCellVerticalAlignment(reloadAnchor, HasVerticalAlignment.ALIGN_MIDDLE);
} else {
content.add(new HTML("An unexpected error occured <br/>Code : " + caught.getStatusCode() + "<br/>" + "Cause : " + caught.getMessage()));
}
final Anchor closeAnchor = new Anchor("close");
closeAnchor.addClickHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
communicationErrorMessagePanel.hide();
}