Quellcode durchsuchen

Added communication error details to error popup. #4502

svn changeset:13854/svn branch:6.4
tags/6.7.0.beta1
John Alhroos vor 14 Jahren
Ursprung
Commit
3fd304bfca
1 geänderte Dateien mit 17 neuen und 10 gelöschten Zeilen
  1. 17
    10
      src/com/vaadin/terminal/gwt/client/ApplicationConnection.java

+ 17
- 10
src/com/vaadin/terminal/gwt/client/ApplicationConnection.java Datei anzeigen

@@ -500,30 +500,37 @@ public class ApplicationConnection {
}

/**
* Shows the communication error notification. The 'details' only go to the
* console for now.
* Shows the communication error notification.
*
* @param details
* Optional details for debugging.
*/
private void showCommunicationError(String details) {
console.error("Communication error: " + details);
String html = "";
StringBuilder html = new StringBuilder();
if (configuration.getCommunicationErrorCaption() != null) {
html += "<h1>" + configuration.getCommunicationErrorCaption()
+ "</h1>";
html.append("<h1>");
html.append(configuration.getCommunicationErrorCaption());
html.append("</h1>");
}
if (configuration.getCommunicationErrorMessage() != null) {
html += "<p>" + configuration.getCommunicationErrorMessage()
+ "</p>";
html.append("<p>");
html.append(configuration.getCommunicationErrorMessage());
html.append("</p>");
}

if (html.length() > 0) {

// Add error description
html.append("<br/><p><I style=\"font-size:0.7em\">");
html.append(details);
html.append("</I></p>");

VNotification n = new VNotification(1000 * 60 * 45);
n.addEventListener(new NotificationRedirect(configuration
.getCommunicationErrorUrl()));
n
.show(html, VNotification.CENTERED_TOP,
VNotification.STYLE_SYSTEM);
n.show(html.toString(), VNotification.CENTERED_TOP,
VNotification.STYLE_SYSTEM);
} else {
redirect(configuration.getCommunicationErrorUrl());
}

Laden…
Abbrechen
Speichern