From: Artur Signell Date: Fri, 23 Mar 2012 07:38:31 +0000 (+0200) Subject: Merge commit '0681a2f396e69cd60238d0e77a2d857af5865252' X-Git-Tag: 7.0.0.alpha2~233 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=041376540c94999e89d1c888b93eabef87de1a66;p=vaadin-framework.git Merge commit '0681a2f396e69cd60238d0e77a2d857af5865252' Conflicts: src/com/vaadin/terminal/gwt/client/ApplicationConnection.java --- 041376540c94999e89d1c888b93eabef87de1a66 diff --cc src/com/vaadin/terminal/gwt/client/ApplicationConnection.java index 71c2142461,a05dc7d758..11947720f8 --- a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java +++ b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java @@@ -144,10 -140,8 +144,10 @@@ public class ApplicationConnection 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; @@@ -218,19 -209,10 +218,19 @@@ * 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( @@@ -1526,24 -1403,9 +1514,20 @@@ 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. *