From 1b73b00b2875c5eafa3c641b77f5d9efc2f7d929 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Wed, 11 Jun 2014 20:35:04 +0300 Subject: Allow changing theme on the fly (#2874) Change-Id: I70c153c4109428686002f985bfe1cb7cba2c9b31 --- shared/src/com/vaadin/shared/ui/ui/UIState.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'shared') diff --git a/shared/src/com/vaadin/shared/ui/ui/UIState.java b/shared/src/com/vaadin/shared/ui/ui/UIState.java index 3c3785b7d5..abdc105ba7 100644 --- a/shared/src/com/vaadin/shared/ui/ui/UIState.java +++ b/shared/src/com/vaadin/shared/ui/ui/UIState.java @@ -62,6 +62,7 @@ public class UIState extends TabIndexState { * Configuration for the push channel */ public PushConfigurationState pushConfiguration = new PushConfigurationState(); + public String theme; { primaryStyleName = "v-ui"; // Default is 1 for legacy reasons @@ -95,7 +96,7 @@ public class UIState extends TabIndexState { NotificationRole role) { this.prefix = prefix; this.postfix = postfix; - this.notificationRole = role; + notificationRole = role; } } -- cgit v1.2.3 From 9ceac5b2a8e9541c012b90f72d5f222ec508556e Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 27 Jun 2014 15:49:26 +0300 Subject: Revert to org.json as Android JSON is not 100% compatible (#13944) Update to new GWT which also uses the correct org.json dependency Change-Id: I9414be188bf59975d01186a9daf83f0c170a88bc --- WebContent/license.html | 2 +- build.properties | 2 +- shared/ivy.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'shared') diff --git a/WebContent/license.html b/WebContent/license.html index d984717773..e1b0bed54a 100644 --- a/WebContent/license.html +++ b/WebContent/license.html @@ -99,7 +99,7 @@ JSON - Apache License, Version 2.0 + The JSON License diff --git a/build.properties b/build.properties index 0fc074ce69..1c8268ee47 100644 --- a/build.properties +++ b/build.properties @@ -6,5 +6,5 @@ vaadin.url=http://vaadin.com vaadin.java.version=1.6 vaadin.version=0.0.0.unversioned-development-build vaadin.sass.version=0.9.6 -gwt.version=2.6.0.vaadin2 +gwt.version=2.6.0.vaadin3 commons-io.version=2.4 diff --git a/shared/ivy.xml b/shared/ivy.xml index 3dfe1a51c2..2dac7adbc2 100644 --- a/shared/ivy.xml +++ b/shared/ivy.xml @@ -27,8 +27,8 @@ conf="build,ide,test->default" /> - + -- cgit v1.2.3 From f7e7f0e4f7ec4463863910ef66308dd71762acce Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Wed, 25 Jun 2014 14:42:30 +0300 Subject: Ignore -1 sync id on the server (#14084) Change-Id: Iad73c44852c207f29381d59bea25275ac8f24dbd --- server/src/com/vaadin/ui/ConnectorTracker.java | 17 +++++++++++++++-- shared/src/com/vaadin/shared/ApplicationConstants.java | 4 +++- 2 files changed, 18 insertions(+), 3 deletions(-) (limited to 'shared') diff --git a/server/src/com/vaadin/ui/ConnectorTracker.java b/server/src/com/vaadin/ui/ConnectorTracker.java index f7eae0013a..c0f973106b 100644 --- a/server/src/com/vaadin/ui/ConnectorTracker.java +++ b/server/src/com/vaadin/ui/ConnectorTracker.java @@ -774,7 +774,7 @@ public class ConnectorTracker implements Serializable { * concurrently or not. * @param lastSyncIdSeenByClient * the most recent sync id the client has seen at the time the - * request was sent + * request was sent, or -1 to ignore potential problems * @return true if the connector was removed before the client * had a chance to react to it. */ @@ -784,7 +784,8 @@ public class ConnectorTracker implements Serializable { assert getConnector(connectorId) == null : "Connector " + connectorId + " is still attached"; - boolean clientRequestIsTooOld = lastSyncIdSeenByClient < currentSyncId; + boolean clientRequestIsTooOld = lastSyncIdSeenByClient < currentSyncId + && lastSyncIdSeenByClient != -1; if (clientRequestIsTooOld) { /* * The headMap call is present here because we're only interested in @@ -823,6 +824,9 @@ public class ConnectorTracker implements Serializable { * packet is sent. If the state has changed on the server side since that, * the server can try to adjust the way it handles the actions from the * client side. + *

+ * The sync id value -1 is ignored to facilitate testing with + * pre-recorded requests. * * @see #setWritingResponse(boolean) * @see #connectorWasPresentAsRequestWasSent(String, long) @@ -846,6 +850,9 @@ public class ConnectorTracker implements Serializable { * Entries that both client and server agree upon are removed. Since * argument is the last sync id that the client has seen from the server, we * know that entries earlier than that cannot cause any problems anymore. + *

+ * The sync id value -1 is ignored to facilitate testing with + * pre-recorded requests. * * @see #connectorWasPresentAsRequestWasSent(String, long) * @since 7.2 @@ -854,6 +861,12 @@ public class ConnectorTracker implements Serializable { * server. */ public void cleanConcurrentlyRemovedConnectorIds(int lastSyncIdSeenByClient) { + if (lastSyncIdSeenByClient == -1) { + // Sync id checking is not in use, so we should just clear the + // entire map to avoid leaking memory + syncIdToUnregisteredConnectorIds.clear(); + return; + } /* * We remove all entries _older_ than the one reported right now, * because the remaining still contain components that might cause diff --git a/shared/src/com/vaadin/shared/ApplicationConstants.java b/shared/src/com/vaadin/shared/ApplicationConstants.java index 9f723763f8..da4ac7450d 100644 --- a/shared/src/com/vaadin/shared/ApplicationConstants.java +++ b/shared/src/com/vaadin/shared/ApplicationConstants.java @@ -111,7 +111,9 @@ public class ApplicationConstants implements Serializable { public static final String CSRF_TOKEN = "csrfToken"; /** - * The name of the parameter used to transmit the sync id + * The name of the parameter used to transmit the sync id. The value can be + * set to -1 e.g. when testing with pre-recorded requests to make the + * framework ignore the sync id. * * @see com.vaadin.ui.ConnectorTracker#getCurrentSyncId() * @since 7.2 -- cgit v1.2.3