*/
public static final String UIDL_REFRESH_TOKEN = "Vaadin-Refresh";
- private final boolean debugLogging = true || false;
-
// will hold the UIDL security key (for XSS protection) once received
private String uidlSecurityKey = "init";
updateDuration.logDuration(" * Creating connectors completed",
10);
- if (debugLogging) {
- VConsole.log(" * Dumping state changes to the console");
- VConsole.dirUIDL(json, ApplicationConnection.this);
-
- updateDuration
- .logDuration(
- " * Dumping state changes to the console completed",
- 10);
- }
-
// Update states, do not fire events
Collection<StateChangeEvent> pendingStateChangeEvents = updateConnectorState(json);
updateDuration
.logDuration(" * Layout processing completed", 10);
+ if (ApplicationConfiguration.isDebugMode()) {
+ VConsole.log(" * Dumping state changes to the console");
+ VConsole.dirUIDL(json, ApplicationConnection.this);
+
+ updateDuration
+ .logDuration(
+ " * Dumping state changes to the console completed",
+ 10);
+ }
+
if (meta != null) {
if (meta.containsKey("appError")) {
ValueMap error = meta.getValueMap("appError");
for (String key : keySet) {
if (key.equals("state")) {
ValueMap stateJson = u.getValueMap(key);
- SimpleTree stateChanges = new SimpleTree("Shared state");
+ SimpleTree stateChanges = new SimpleTree("shared state");
- for (String stateKey : stateJson.getKeySet()) {
- stateChanges.add(new SharedStateItem(stateKey, stateJson
- .getValueMap(stateKey)));
+ for (String connectorId : stateJson.getKeySet()) {
+ stateChanges.add(new SharedStateItem(connectorId, stateJson
+ .getValueMap(connectorId)));
}
add(stateChanges);
}
} else if (key.equals("meta")) {
- } else if (key.equals("hierarchy")) {
- ValueMap hierJSON = u.getValueMap(key);
- SimpleTree hierarchy = new SimpleTree("Hierarchy");
- for (String hierKey : hierJSON.getKeySet()) {
- hierarchy.addItem(hierKey + ": "
- + hierJSON.getAsString(hierKey));
- }
- add(hierarchy);
} else {
- // TODO consider pretty printing other request data
+ // TODO consider pretty printing other request data such as
+ // hierarchy changes
// addItem(key + " : " + u.getAsString(key));
}
}
this.connectorId = connectorId;
ComponentConnector connector = getConnector();
if (connector != null) {
- setText(connectorId + " " + connector.getState().getDebugId()
- + " " + connector.getClass());
+ setText(Util.getConnectorString(connector));
} else {
- setText(connectorId + " unknown");
+ setText("Unknown connector " + connectorId);
}
dir(new JSONObject(stateChanges), this);
}