protected boolean applicationRunning = false;
- private int activeRequests = 0;
+ private boolean hasActiveRequest = false;
+ protected boolean cssLoaded = false;
+
/** Parameters for this application connection loaded from the web-page */
private ApplicationConfiguration configuration;
* failed to start. This ensures that the applications are started in order,
* to avoid session-id problems.
*
- * @return
*/
public void start() {
- repaintAll();
+ String jsonText = configuration.getUIDL();
+ if (jsonText == null) {
+ // inital UIDL not in DOM, request later
+ repaintAll();
+ } else {
+ // Update counter so TestBench knows something is still going on
- incrementActiveRequests();
++ hasActiveRequest = true;
+
+ // initial UIDL provided in DOM, continue as if returned by request
+ handleJSONText(jsonText, -1);
+ }
}
private native void initializeTestbenchHooks(
req.append(VAR_BURST_SEPARATOR);
}
}
- makeUidlRequest(req.toString(), "", forceSync);
+
+ // Include the browser detail parameters if they aren't already sent
+ String extraParams;
+ if (!getConfiguration().isBrowserDetailsSent()) {
+ extraParams = getNativeBrowserDetailsParameters(getConfiguration()
+ .getRootPanelId());
+ getConfiguration().setBrowserDetailsSent();
+ } else {
+ extraParams = "";
+ }
+
+ makeUidlRequest(req.toString(), extraParams, forceSync);
}
- private void makeUidlRequest(String string) {
- makeUidlRequest(string, "", false);
- }
-
/**
* Sends a new value for the given paintables given variable to the server.
* <p>