summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2016-04-21 10:24:12 +0300
committerTeemu Suo-Anttila <teemusa@vaadin.com>2016-04-21 10:24:12 +0300
commitfa6f39bc84fa94f876248f6e967a3c9cefcd097b (patch)
tree29644e1376a93fec862f185da221845346265fad /server
parent1bb67a02544e0fbf2999e5a814c79475d1b05c9b (diff)
parentb2f283b414129407f4e839470380e5e5d0383fb4 (diff)
downloadvaadin-framework-fa6f39bc84fa94f876248f6e967a3c9cefcd097b.tar.gz
vaadin-framework-fa6f39bc84fa94f876248f6e967a3c9cefcd097b.zip
Merge remote-tracking branch 'origin/master' into feature/mavenize
Change-Id: I1c55d6158caf32b796a9ad0d9e8df5392812e9a6
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/data/util/IndexedContainer.java4
-rw-r--r--server/src/main/java/com/vaadin/server/DefaultDeploymentConfiguration.java14
-rw-r--r--server/src/main/java/com/vaadin/server/UIProvider.java12
-rw-r--r--server/src/main/java/com/vaadin/server/communication/ServerRpcHandler.java6
-rw-r--r--server/src/main/java/com/vaadin/server/communication/UidlRequestHandler.java2
-rw-r--r--server/src/main/java/com/vaadin/server/widgetsetutils/ClassPathExplorer.java2
-rw-r--r--server/src/test/java/com/vaadin/data/util/AbstractContainerTestBase.java4
7 files changed, 35 insertions, 9 deletions
diff --git a/server/src/main/java/com/vaadin/data/util/IndexedContainer.java b/server/src/main/java/com/vaadin/data/util/IndexedContainer.java
index b851baf674..8783c061ac 100644
--- a/server/src/main/java/com/vaadin/data/util/IndexedContainer.java
+++ b/server/src/main/java/com/vaadin/data/util/IndexedContainer.java
@@ -741,6 +741,10 @@ public class IndexedContainer extends
*/
@Override
public Property getItemProperty(Object id) {
+ if (!propertyIds.contains(id)) {
+ return null;
+ }
+
return new IndexedContainerProperty(itemId, id);
}
diff --git a/server/src/main/java/com/vaadin/server/DefaultDeploymentConfiguration.java b/server/src/main/java/com/vaadin/server/DefaultDeploymentConfiguration.java
index b26e048431..1f22a9e33d 100644
--- a/server/src/main/java/com/vaadin/server/DefaultDeploymentConfiguration.java
+++ b/server/src/main/java/com/vaadin/server/DefaultDeploymentConfiguration.java
@@ -125,14 +125,14 @@ public class DefaultDeploymentConfiguration extends
String defaultValue) {
String val = null;
- // Try application properties
- val = getApplicationProperty(propertyName);
+ // Try system properties
+ val = getSystemProperty(propertyName);
if (val != null) {
return val;
}
- // Try system properties
- val = getSystemProperty(propertyName);
+ // Try application properties
+ val = getApplicationProperty(propertyName);
if (val != null) {
return val;
}
@@ -175,6 +175,12 @@ public class DefaultDeploymentConfiguration extends
// Try lowercased system properties
val = System.getProperty(pkgName + parameterName.toLowerCase());
+ if (val != null) {
+ return val;
+ }
+
+ // version prefixed with just "vaadin."
+ val = System.getProperty("vaadin." + parameterName);
return val;
}
diff --git a/server/src/main/java/com/vaadin/server/UIProvider.java b/server/src/main/java/com/vaadin/server/UIProvider.java
index 4ed86b9c31..7fd880919e 100644
--- a/server/src/main/java/com/vaadin/server/UIProvider.java
+++ b/server/src/main/java/com/vaadin/server/UIProvider.java
@@ -16,6 +16,7 @@
package com.vaadin.server;
+import java.io.InputStream;
import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.lang.annotation.Inherited;
@@ -30,6 +31,10 @@ import com.vaadin.shared.ui.ui.Transport;
import com.vaadin.ui.UI;
public abstract class UIProvider implements Serializable {
+
+ /* Default widgetset name to look for */
+ private static final String APP_WIDGETSET_NAME = "AppWidgetset";
+
public abstract Class<? extends UI> getUIClass(UIClassSelectionEvent event);
public UI createInstance(UICreateEvent event) {
@@ -136,8 +141,13 @@ public abstract class UIProvider implements Serializable {
if (uiWidgetset != null) {
return uiWidgetset.value();
} else {
- return null;
+ InputStream resource = event.getUIClass().getResourceAsStream(
+ "/" + APP_WIDGETSET_NAME + ".gwt.xml");
+ if (resource != null) {
+ return APP_WIDGETSET_NAME;
+ }
}
+ return null;
}
/**
diff --git a/server/src/main/java/com/vaadin/server/communication/ServerRpcHandler.java b/server/src/main/java/com/vaadin/server/communication/ServerRpcHandler.java
index 3503a2d8b1..be261ede92 100644
--- a/server/src/main/java/com/vaadin/server/communication/ServerRpcHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/ServerRpcHandler.java
@@ -324,7 +324,7 @@ public class ServerRpcHandler implements Serializable {
* @param invocationsData
* JSON containing all information needed to execute all
* requested RPC calls.
- * @since
+ * @since 7.7
*/
protected void handleInvocations(UI ui, int lastSyncIdSeenByClient,
JsonArray invocationsData) {
@@ -423,7 +423,7 @@ public class ServerRpcHandler implements Serializable {
/**
* Handles the given RPC method invocation for the given connector
*
- * @since
+ * @since 7.7
* @param ui
* the UI containing the connector
* @param connector
@@ -446,7 +446,7 @@ public class ServerRpcHandler implements Serializable {
* Handles the given Legacy variable change RPC method invocation for the
* given connector
*
- * @since
+ * @since 7.7
* @param ui
* the UI containing the connector
* @param connector
diff --git a/server/src/main/java/com/vaadin/server/communication/UidlRequestHandler.java b/server/src/main/java/com/vaadin/server/communication/UidlRequestHandler.java
index db18bb9e1e..20b906c3e6 100644
--- a/server/src/main/java/com/vaadin/server/communication/UidlRequestHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/UidlRequestHandler.java
@@ -60,7 +60,7 @@ public class UidlRequestHandler extends SynchronizedRequestHandler implements
/**
* Creates the ServerRpcHandler to use
*
- * @since
+ * @since 7.7
* @return the ServerRpcHandler to use
*/
protected ServerRpcHandler createRpcHandler() {
diff --git a/server/src/main/java/com/vaadin/server/widgetsetutils/ClassPathExplorer.java b/server/src/main/java/com/vaadin/server/widgetsetutils/ClassPathExplorer.java
index 255f34d936..45bd3751d3 100644
--- a/server/src/main/java/com/vaadin/server/widgetsetutils/ClassPathExplorer.java
+++ b/server/src/main/java/com/vaadin/server/widgetsetutils/ClassPathExplorer.java
@@ -506,6 +506,8 @@ public class ClassPathExplorer {
* directory (not a JAR file etc.) on the classpath.
*
* TODO this could be done better...
+ *
+ * @since 7.6.5
*
* @param widgetsetFileName
* relative path for the widgetset
diff --git a/server/src/test/java/com/vaadin/data/util/AbstractContainerTestBase.java b/server/src/test/java/com/vaadin/data/util/AbstractContainerTestBase.java
index c70cf98449..64f1a31399 100644
--- a/server/src/test/java/com/vaadin/data/util/AbstractContainerTestBase.java
+++ b/server/src/test/java/com/vaadin/data/util/AbstractContainerTestBase.java
@@ -153,6 +153,10 @@ public abstract class AbstractContainerTestBase {
}
+ // getItemProperty
+ Assert.assertNull(container.getItem(itemIdInSet).getItemProperty(
+ "notinset"));
+
}
protected static final Object FULLY_QUALIFIED_NAME = "fullyQualifiedName";