summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebContent/VAADIN/themes/base/debug/debug.scss89
-rw-r--r--WebContent/release-notes.html24
-rw-r--r--client/src/com/vaadin/Vaadin.gwt.xml2
-rw-r--r--client/src/com/vaadin/client/ApplicationConnection.java2
-rw-r--r--client/src/com/vaadin/client/SimpleTree.java2
-rw-r--r--client/src/com/vaadin/client/VUIDLBrowser.java8
-rw-r--r--client/src/com/vaadin/client/debug/internal/HierarchySection.java28
-rw-r--r--client/src/com/vaadin/client/debug/internal/Highlight.java15
-rw-r--r--client/src/com/vaadin/client/debug/internal/InfoSection.java2
-rw-r--r--client/src/com/vaadin/client/debug/internal/NetworkSection.java17
-rw-r--r--common.xml1
-rw-r--r--push/build.xml4
-rw-r--r--push/ivy.xml2
-rw-r--r--server/src/com/vaadin/server/Constants.java2
-rw-r--r--server/src/com/vaadin/server/DefaultDeploymentConfiguration.java33
-rw-r--r--server/src/com/vaadin/server/DeploymentConfiguration.java24
-rw-r--r--server/src/com/vaadin/server/VaadinPortletResponse.java15
-rw-r--r--server/src/com/vaadin/server/VaadinSession.java7
-rw-r--r--server/src/com/vaadin/server/communication/PortletListenerNotifier.java29
-rw-r--r--server/src/com/vaadin/server/communication/PortletStateAwareRequestHandler.java9
-rw-r--r--server/tests/src/com/vaadin/server/VaadinServletConfigurationTest.java32
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/TestStringToBooleanConverter.java2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/TestStringToDateConverter.java2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/TestStringToDoubleConverter.java2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/TestStringToFloatConverter.java2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/TestStringToIntegerConverter.java2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/TestStringToNumberConverter.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java3
-rw-r--r--uitest/integration_tests.xml7
-rw-r--r--uitest/src/com/vaadin/tests/components/AbstractTestUI.java25
30 files changed, 270 insertions, 124 deletions
diff --git a/WebContent/VAADIN/themes/base/debug/debug.scss b/WebContent/VAADIN/themes/base/debug/debug.scss
index 168c666923..0992f19bb9 100644
--- a/WebContent/VAADIN/themes/base/debug/debug.scss
+++ b/WebContent/VAADIN/themes/base/debug/debug.scss
@@ -72,6 +72,7 @@
opacity: 0.8;
color: $maincolor;
+ font-family: Arial, Helvetica, Tahoma, Verdana, sans-serif;
font-size: 13px;
.v-debugwindow-handle {
@@ -160,8 +161,10 @@
border-bottom: 1px solid $lightborder;
box-shadow: 0px 0px 7px 0 rgba(55,55,55,0.6);
- min-height: 1.5em;
+ min-height: 1.5em;
+ line-height: 1.5em;
+
padding-left: 5px;
}
@@ -189,8 +192,6 @@
background-color: $mainbg;
border: 1px solid $darkborder;
border-top: none;
-
- font-family: monospace;
}
.v-debugwindow-menu {
@@ -213,20 +214,18 @@
width: 33%;
}
-
- /* LOG */
- .v-debugwindow-reset {
- color: #fff;
- background-color: #4C92ED;
- padding: 4px;
- }
-
+ /* GLOBAL color every other row */
.v-debugwindow-row {
display: table-row;
}
.v-debugwindow-row:nth-child(odd) {
background-color: rgba(0, 61, 255, 0.11);
}
+ .v-debugwindow-row > span {
+ display: table-cell;
+ padding: 4px;
+ }
+
.v-debugwindow-row.SEVERE {
color: #550000;
background-color: #FFC5C5;
@@ -243,29 +242,6 @@
.v-debugwindow-row.FINEST {
color: lighten($maincolor, 15%);
}
-
- .v-debugwindow-row > span {
- display: table-cell;
- padding: 4px;
- }
-
- .v-debugwindow-time {
- text-align: right;
- color: #999;
- }
- .v-debugwindow-message {
- white-space: nowrap;
- width: 100%
- }
- .v-debugwindow-message:hover {
- white-space: normal;
- word-wrap: break-word;
- }
- .v-debugwindow-message em {
- background-color: #C4E6F8;
- }
-
- /* HIERARCHY */
.v-debugwindow-row > span.caption {
color: #999;
text-align: right;
@@ -275,11 +251,48 @@
width: 100%;
}
- /* INFO */
- .v-debugwindow-info {
+ /* LOG */
+ .v-debugwindow-log {
+ font-family: monospace;
+
+ .v-debugwindow-reset {
+ color: #fff;
+ background-color: #4C92ED;
+ padding: 4px;
+ }
+
+ .v-debugwindow-time {
+ text-align: right;
+ color: #999;
+ }
+ .v-debugwindow-message {
+ white-space: nowrap;
+ width: 100%
+ }
+ .v-debugwindow-message:hover {
+ white-space: normal;
+ word-wrap: break-word;
+ }
+ .v-debugwindow-message em {
+ background-color: #C4E6F8;
+ }
+ }
+
+ /* HIERARCHY */
+ .v-debugwindow-hierarchy {
+ .v-debugwindow-info {
+ padding: 1em;
+ }
+ }
+
+
+ /* NETWORK */
+ .v-debugwindow-network {
.v-debugwindow-row {
- display:block;
- min-width: 100%;
+ display: block !important;
+ }
+ .v-debugwindow-row > span {
+ display: inline;
}
}
diff --git a/WebContent/release-notes.html b/WebContent/release-notes.html
index 7175214e82..f3ec68e41f 100644
--- a/WebContent/release-notes.html
+++ b/WebContent/release-notes.html
@@ -544,13 +544,13 @@
</p>
<ul>
- <li>Apache Tomcat, version 5.0 or newer</li>
- <li>Oracle WebLogic&reg; Server, version 10.3 or newer</li>
- <li>IBM WebSphere&reg; Application Server, version 7 or
- newer</li>
- <li>JBoss Application Server, 4.0.0 or newer</li>
- <li>Jetty, version 5.0 or newer</li>
- <li>Glassfish, version 2.0 or newer</li>
+ <li>Apache Tomcat 5-7</li>
+ <li>Apache TomEE 1</li>
+ <li>Oracle WebLogic Server 10.3-12</li>
+ <li>IBM WebSphere Application Server 7-8</li>
+ <li>JBoss Application Server 4-7</li>
+ <li>Jetty 5-9</li>
+ <li>Glassfish 2-4</li>
</ul>
<p>
@@ -560,9 +560,9 @@
</p>
<ul>
- <li>Liferay Portal 5.2 or newer</li>
- <li>GateIn Portal 3.1 or newer</li>
- <li>eXo Platform 3 or newer</li>
+ <li>Liferay Portal 5.2-6</li>
+ <li>GateIn Portal 3</li>
+ <li>eXo Platform 3</li>
</ul>
<p>
@@ -588,8 +588,8 @@
</p>
<ul>
- <li>iOS 5, 6</li>
- <li>Android 2.3, 3, 4</li>
+ <li>iOS 5-6</li>
+ <li>Android 2.3-4</li>
</ul>
<p>Vaadin SQL Container supports the following databases:</p>
diff --git a/client/src/com/vaadin/Vaadin.gwt.xml b/client/src/com/vaadin/Vaadin.gwt.xml
index 776886bb1b..a1dca07a1c 100644
--- a/client/src/com/vaadin/Vaadin.gwt.xml
+++ b/client/src/com/vaadin/Vaadin.gwt.xml
@@ -61,6 +61,6 @@
<add-linker name="xsiframe" />
<!-- Remove IE6/IE7 permutation as they are not supported -->
- <set-property name="user.agent" value="ie8,ie9,gecko1_8,safari,opera" />
+ <set-property name="user.agent" value="ie8,ie9,ie10,gecko1_8,safari,opera" />
</module>
diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java
index 4229ca0b67..d873cc8dc6 100644
--- a/client/src/com/vaadin/client/ApplicationConnection.java
+++ b/client/src/com/vaadin/client/ApplicationConnection.java
@@ -3408,7 +3408,7 @@ public class ApplicationConnection {
* @since 7.1
* @return A string representation of the current transport type
*/
- public String getCommunicationMethod() {
+ public String getCommunicationMethodName() {
if (push != null) {
return "Push (" + push.getTransportType() + ")";
} else {
diff --git a/client/src/com/vaadin/client/SimpleTree.java b/client/src/com/vaadin/client/SimpleTree.java
index 0745a49aa0..289f05022a 100644
--- a/client/src/com/vaadin/client/SimpleTree.java
+++ b/client/src/com/vaadin/client/SimpleTree.java
@@ -79,7 +79,7 @@ public class SimpleTree extends ComplexPanel implements HasDoubleClickHandlers {
if (event.getNativeEvent().getEventTarget().cast() == handle) {
if (children.getStyle().getDisplay().intern() == Display.NONE
.getCssName()) {
- open(event.getNativeEvent().getShiftKey());
+ open(event.getNativeEvent().getAltKey());
} else {
close();
}
diff --git a/client/src/com/vaadin/client/VUIDLBrowser.java b/client/src/com/vaadin/client/VUIDLBrowser.java
index e6f38fb167..ee64a5b7b0 100644
--- a/client/src/com/vaadin/client/VUIDLBrowser.java
+++ b/client/src/com/vaadin/client/VUIDLBrowser.java
@@ -49,9 +49,7 @@ import com.vaadin.client.ui.VWindow;
*/
@Deprecated
public class VUIDLBrowser extends SimpleTree {
- private static final String HELP = "Shift click handle to open recursively. "
- + " Click components to highlight them on client side."
- + " Shift click components to highlight them also on the server side.";
+ private static final String HELP = "Alt-click handle to open recursively. ";
private ApplicationConnection client;
private String highlightedPid;
@@ -107,7 +105,6 @@ public class VUIDLBrowser extends SimpleTree {
protected StateChangeItem() {
setTitle(HELP);
-
addDomHandler(new MouseOutHandler() {
@Override
public void onMouseOut(MouseOutEvent event) {
@@ -120,8 +117,7 @@ public class VUIDLBrowser extends SimpleTree {
protected void select(ClickEvent event) {
ServerConnector connector = getConnector();
- if (connector != null && event != null
- && event.getNativeEvent().getShiftKey()) {
+ if (connector != null && event != null) {
connector.getConnection().highlightConnector(connector);
}
diff --git a/client/src/com/vaadin/client/debug/internal/HierarchySection.java b/client/src/com/vaadin/client/debug/internal/HierarchySection.java
index e4f3e2dcb1..90c9086d7d 100644
--- a/client/src/com/vaadin/client/debug/internal/HierarchySection.java
+++ b/client/src/com/vaadin/client/debug/internal/HierarchySection.java
@@ -126,6 +126,14 @@ public class HierarchySection implements Section {
});
content.setStylePrimaryName(VDebugWindow.STYLENAME + "-hierarchy");
+
+ HTML info = new HTML(showHierarchy.getHTML() + " "
+ + showHierarchy.getTitle() + "<br/>" + find.getHTML() + " "
+ + find.getTitle() + "<br/>" + analyze.getHTML() + " "
+ + analyze.getTitle() + "<br/>" + generateWS.getHTML() + " "
+ + generateWS.getTitle() + "<br/>");
+ info.setStyleName(VDebugWindow.STYLENAME + "-info");
+ content.add(info);
}
private void showHierarchy() {
@@ -160,6 +168,7 @@ public class HierarchySection implements Section {
@Override
public void onClick(ClickEvent event) {
Highlight.showOnly(connector);
+ Highlight.showServerDebugInfo(connector);
}
});
widget = label;
@@ -169,6 +178,7 @@ public class HierarchySection implements Section {
protected void select(ClickEvent event) {
super.select(event);
Highlight.showOnly(connector);
+ Highlight.showServerDebugInfo(connector);
}
};
for (ServerConnector child : children) {
@@ -182,7 +192,7 @@ public class HierarchySection implements Section {
has.addDoubleClickHandler(new DoubleClickHandler() {
@Override
public void onDoubleClick(DoubleClickEvent event) {
- printState(connector);
+ printState(connector, true);
}
});
}
@@ -408,8 +418,7 @@ public class HierarchySection implements Section {
errorDetails.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
- printState(connector);
- Highlight.show(connector);
+ printState(connector, true);
}
});
@@ -460,7 +469,7 @@ public class HierarchySection implements Section {
public void onClick(ClickEvent event) {
if (event.getNativeEvent().getEventTarget().cast() == errorNode
.getElement().getChild(1).cast()) {
- printState(connector);
+ printState(connector, true);
}
}
}, ClickEvent.getType());
@@ -549,8 +558,11 @@ public class HierarchySection implements Section {
}
}
- private void printState(ServerConnector connector) {
+ private void printState(ServerConnector connector, boolean serverDebug) {
Highlight.showOnly(connector);
+ if (serverDebug) {
+ Highlight.showServerDebugInfo(connector);
+ }
SharedState state = connector.getState();
@@ -635,7 +647,7 @@ public class HierarchySection implements Section {
RootPanel.get(), eventTarget);
}
if (connector != null) {
- printState(connector);
+ printState(connector, false);
event.cancel();
event.consume();
event.getNativeEvent().stopPropagation();
@@ -663,7 +675,7 @@ public class HierarchySection implements Section {
}
if (connector != null) {
- printState(connector);
+ printState(connector, true);
return;
}
}
@@ -673,4 +685,4 @@ public class HierarchySection implements Section {
};
-} \ No newline at end of file
+}
diff --git a/client/src/com/vaadin/client/debug/internal/Highlight.java b/client/src/com/vaadin/client/debug/internal/Highlight.java
index f2695f58ca..3c1af445a9 100644
--- a/client/src/com/vaadin/client/debug/internal/Highlight.java
+++ b/client/src/com/vaadin/client/debug/internal/Highlight.java
@@ -207,4 +207,19 @@ public class Highlight {
}
}
+ /**
+ * Outputs debug information on the server - usually in the console of an
+ * IDE, with a clickable reference to the relevant code location.
+ *
+ * @since 7.1
+ * @param connector
+ * show debug info for this connector
+ */
+ static void showServerDebugInfo(ServerConnector connector) {
+ if (connector != null) {
+ connector.getConnection().getUIConnector()
+ .showServerDebugInfo(connector);
+ }
+ }
+
}
diff --git a/client/src/com/vaadin/client/debug/internal/InfoSection.java b/client/src/com/vaadin/client/debug/internal/InfoSection.java
index 865cfac4ff..ade3bdd52d 100644
--- a/client/src/com/vaadin/client/debug/internal/InfoSection.java
+++ b/client/src/com/vaadin/client/debug/internal/InfoSection.java
@@ -165,7 +165,7 @@ public class InfoSection implements Section {
addRow("Widget set", GWT.getModuleName());
addRow("Theme", connection.getConfiguration().getThemeName());
- String communicationMethodInfo = connection.getCommunicationMethod();
+ String communicationMethodInfo = connection.getCommunicationMethodName();
int pollInterval = connection.getUIConnector().getState().pollInterval;
if (pollInterval > 0) {
communicationMethodInfo += " (poll interval " + pollInterval + "s)";
diff --git a/client/src/com/vaadin/client/debug/internal/NetworkSection.java b/client/src/com/vaadin/client/debug/internal/NetworkSection.java
index e94791ce1f..a1cb8138ef 100644
--- a/client/src/com/vaadin/client/debug/internal/NetworkSection.java
+++ b/client/src/com/vaadin/client/debug/internal/NetworkSection.java
@@ -16,7 +16,7 @@
package com.vaadin.client.debug.internal;
import com.google.gwt.user.client.ui.FlowPanel;
-import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.client.ApplicationConnection;
import com.vaadin.client.VUIDLBrowser;
@@ -37,9 +37,13 @@ public class NetworkSection implements Section {
private final DebugButton tabButton = new DebugButton(Icon.NETWORK,
"Communication");
- private final HorizontalPanel controls = new HorizontalPanel();
+ private final HTML controls = new HTML(tabButton.getTitle());
private final FlowPanel content = new FlowPanel();
+ public NetworkSection() {
+ content.setStyleName(VDebugWindow.STYLENAME + "-network");
+ }
+
@Override
public DebugButton getTabButton() {
return tabButton;
@@ -76,19 +80,16 @@ public class NetworkSection implements Section {
public void uidl(ApplicationConnection ac, ValueMap uidl) {
int sinceStart = VDebugWindow.getMillisSinceStart();
int sinceReset = VDebugWindow.getMillisSinceReset();
+
VUIDLBrowser vuidlBrowser = new VUIDLBrowser(uidl, ac);
vuidlBrowser.addStyleName(VDebugWindow.STYLENAME + "-row");
- // TODO style this
- /*-
- vuidlBrowser.setText("<span class=\"" + VDebugWindow.STYLENAME
- + "-time\">" + sinceReset + "ms</span><span class=\""
- + VDebugWindow.STYLENAME + "-message\">response</span>");
- -*/
vuidlBrowser.setText("Response @ " + sinceReset + "ms");
vuidlBrowser.setTitle(VDebugWindow.getTimingTooltip(sinceStart,
sinceReset));
vuidlBrowser.close();
+
content.add(vuidlBrowser);
+
while (content.getWidgetCount() > maxSize) {
content.remove(0);
}
diff --git a/common.xml b/common.xml
index 02473b4385..993802404f 100644
--- a/common.xml
+++ b/common.xml
@@ -320,6 +320,7 @@
<exclude name="**/Mock*" />
<exclude name="com/vaadin/tests/data/bean/*" />
<exclude name="com/vaadin/tests/util/*" />
+ <exclude name="com/vaadin/benchmarks/*" />
<exclude name="**/VaadinClasses.java" />
<exclude name="**/*TestRunner.java" />
<exclude name="**/SQLTestsConstants.java" />
diff --git a/push/build.xml b/push/build.xml
index 2cd86d9ce5..f18caf69b4 100644
--- a/push/build.xml
+++ b/push/build.xml
@@ -12,8 +12,8 @@
<property name="result.dir" location="result" />
<property name="vaadinPush.js" location="${result.dir}/js/VAADIN/vaadinPush.js" />
- <!-- Keep the version number in sync with ivy.xml -->
- <property name="atmosphere.version" value="1.0.14-2" />
+ <!-- Keep the version number in sync with ivy.xml and server/src/com/vaadin/server/Constants.java-->
+ <property name="atmosphere.version" value="1.0.14-vaadin1" />
<property name="jquery.version" value="1.7.2" />
<path id="classpath.compile.custom" />
diff --git a/push/ivy.xml b/push/ivy.xml
index d0a60dc1c3..444e8908e0 100644
--- a/push/ivy.xml
+++ b/push/ivy.xml
@@ -28,7 +28,7 @@
<!-- Atmosphere -->
<!-- Keep the version number in sync with build.xml -->
<dependency org="com.vaadin.external.atmosphere" name="atmosphere-runtime"
- rev="1.0.14-2" conf="build,ide,test -> default">
+ rev="1.0.14-vaadin1" conf="build,ide,test -> default">
</dependency>
</dependencies>
diff --git a/server/src/com/vaadin/server/Constants.java b/server/src/com/vaadin/server/Constants.java
index 0ea9de252a..bcdb62064b 100644
--- a/server/src/com/vaadin/server/Constants.java
+++ b/server/src/com/vaadin/server/Constants.java
@@ -65,7 +65,7 @@ public interface Constants {
+ " Widgetset version: %s\n"
+ "=================================================================";
- static final String REQUIRED_ATMOSPHERE_VERSION = "1.0.14-2";
+ static final String REQUIRED_ATMOSPHERE_VERSION = "1.0.14-vaadin1";
static final String INVALID_ATMOSPHERE_VERSION_WARNING = "\n"
+ "=================================================================\n"
diff --git a/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java b/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java
index 993d60133b..519d81eb6d 100644
--- a/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java
+++ b/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java
@@ -86,27 +86,24 @@ public class DefaultDeploymentConfiguration implements DeploymentConfiguration {
}
private void checkLegacyPropertyToString() {
- // Verify that the default value has not changed without also
- // updating logic here
- assert DEFAULT_LEGACY_PROPERTY_TO_STRING == LegacyProperyToStringMode.WARNING;
-
String param = getApplicationOrSystemProperty(
- Constants.SERVLET_PARAMETER_LEGACY_PROPERTY_TOSTRING, "warning");
-
- if ("true".equals(param)) {
- legacyPropertyToStringMode = LegacyProperyToStringMode.ENABLED;
- } else if ("false".equals(param)) {
- legacyPropertyToStringMode = LegacyProperyToStringMode.DISABLED;
- } else {
- if (!"warning".equals(param)) {
- getLogger()
- .log(Level.WARNING,
- Constants.WARNING_UNKNOWN_LEGACY_PROPERTY_TOSTRING_VALUE,
- param);
-
+ Constants.SERVLET_PARAMETER_LEGACY_PROPERTY_TOSTRING,
+ DEFAULT_LEGACY_PROPERTY_TO_STRING.getPropertyString());
+
+ for (LegacyProperyToStringMode mode : LegacyProperyToStringMode
+ .values()) {
+ if (mode.getPropertyString().equals(param)) {
+ legacyPropertyToStringMode = mode;
+ return;
}
- legacyPropertyToStringMode = DEFAULT_LEGACY_PROPERTY_TO_STRING;
}
+
+ getLogger()
+ .log(Level.WARNING,
+ Constants.WARNING_UNKNOWN_LEGACY_PROPERTY_TOSTRING_VALUE,
+ param);
+
+ legacyPropertyToStringMode = DEFAULT_LEGACY_PROPERTY_TO_STRING;
}
@Override
diff --git a/server/src/com/vaadin/server/DeploymentConfiguration.java b/server/src/com/vaadin/server/DeploymentConfiguration.java
index bf9c019b6d..8c24379db3 100644
--- a/server/src/com/vaadin/server/DeploymentConfiguration.java
+++ b/server/src/com/vaadin/server/DeploymentConfiguration.java
@@ -40,7 +40,29 @@ public interface DeploymentConfiguration extends Serializable {
*/
@Deprecated
public enum LegacyProperyToStringMode {
- DISABLED, WARNING, ENABLED;
+ DISABLED("false"), WARNING("warning"), ENABLED("true");
+
+ private final String propertyString;
+
+ private LegacyProperyToStringMode(String propertyString) {
+ this.propertyString = propertyString;
+ }
+
+ /**
+ * Gets the string that should be used in e.g. web.xml for selecting
+ * this mode.
+ *
+ * @return the property value
+ */
+ public String getPropertyString() {
+ return propertyString;
+ }
+
+ @Override
+ public String toString() {
+ // Used by VaadinServlet.readConfigurationAnnotation()
+ return getPropertyString();
+ }
public boolean useLegacyMode() {
return this == WARNING || this == ENABLED;
diff --git a/server/src/com/vaadin/server/VaadinPortletResponse.java b/server/src/com/vaadin/server/VaadinPortletResponse.java
index 334b94a5dc..ccb35a2c91 100644
--- a/server/src/com/vaadin/server/VaadinPortletResponse.java
+++ b/server/src/com/vaadin/server/VaadinPortletResponse.java
@@ -85,12 +85,23 @@ public class VaadinPortletResponse implements VaadinResponse {
@Override
public void setContentType(String type) {
- ((MimeResponse) response).setContentType(type);
+ if (response instanceof MimeResponse) {
+ ((MimeResponse) response).setContentType(type);
+ } else {
+ throw new RuntimeException(
+ "Content type cannot be set for response of type "
+ + response.getClass().getName());
+ }
}
@Override
public PrintWriter getWriter() throws IOException {
- return ((MimeResponse) response).getWriter();
+ if (response instanceof MimeResponse) {
+ return ((MimeResponse) response).getWriter();
+ } else {
+ throw new IOException("Writer not available for response of type "
+ + response.getClass().getName());
+ }
}
@Override
diff --git a/server/src/com/vaadin/server/VaadinSession.java b/server/src/com/vaadin/server/VaadinSession.java
index 82f245594f..504788d479 100644
--- a/server/src/com/vaadin/server/VaadinSession.java
+++ b/server/src/com/vaadin/server/VaadinSession.java
@@ -203,7 +203,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
* session is serialized as long as it doesn't happen while some other
* thread has the lock.
*/
- private transient final ConcurrentLinkedQueue<FutureAccess> pendingAccessQueue = new ConcurrentLinkedQueue<FutureAccess>();
+ private transient ConcurrentLinkedQueue<FutureAccess> pendingAccessQueue;
/**
* Create a new service session tied to a Vaadin service
@@ -1250,6 +1250,11 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
* @return the pending access queue
*/
public Queue<FutureAccess> getPendingAccessQueue() {
+ if (pendingAccessQueue == null) {
+ // pendingAccessQueue is transient, so will be null after
+ // deserialization
+ pendingAccessQueue = new ConcurrentLinkedQueue<FutureAccess>();
+ }
return pendingAccessQueue;
}
diff --git a/server/src/com/vaadin/server/communication/PortletListenerNotifier.java b/server/src/com/vaadin/server/communication/PortletListenerNotifier.java
index 5c03a6f4dc..34e007c770 100644
--- a/server/src/com/vaadin/server/communication/PortletListenerNotifier.java
+++ b/server/src/com/vaadin/server/communication/PortletListenerNotifier.java
@@ -59,9 +59,9 @@ public class PortletListenerNotifier extends SynchronizedRequestHandler {
VaadinRequest request, VaadinResponse response) throws IOException {
VaadinPortletSession sess = (VaadinPortletSession) session;
- PortletRequest req = ((VaadinPortletRequest) request)
+ PortletRequest portletRequest = ((VaadinPortletRequest) request)
.getPortletRequest();
- PortletResponse resp = ((VaadinPortletResponse) response)
+ PortletResponse portletResponse = ((VaadinPortletResponse) response)
.getPortletResponse();
// Finds the right UI
@@ -70,18 +70,19 @@ public class PortletListenerNotifier extends SynchronizedRequestHandler {
uI = session.getService().findUI(request);
}
- if (request instanceof RenderRequest) {
- sess.firePortletRenderRequest(uI, (RenderRequest) req,
- (RenderResponse) resp);
- } else if (request instanceof ActionRequest) {
- sess.firePortletActionRequest(uI, (ActionRequest) req,
- (ActionResponse) resp);
- } else if (request instanceof EventRequest) {
- sess.firePortletEventRequest(uI, (EventRequest) req,
- (EventResponse) resp);
- } else if (request instanceof ResourceRequest) {
- sess.firePortletResourceRequest(uI, (ResourceRequest) req,
- (ResourceResponse) resp);
+ if (portletRequest instanceof RenderRequest) {
+ sess.firePortletRenderRequest(uI, (RenderRequest) portletRequest,
+ (RenderResponse) portletResponse);
+ } else if (portletRequest instanceof ActionRequest) {
+ sess.firePortletActionRequest(uI, (ActionRequest) portletRequest,
+ (ActionResponse) portletResponse);
+ } else if (portletRequest instanceof EventRequest) {
+ sess.firePortletEventRequest(uI, (EventRequest) portletRequest,
+ (EventResponse) portletResponse);
+ } else if (portletRequest instanceof ResourceRequest) {
+ sess.firePortletResourceRequest(uI,
+ (ResourceRequest) portletRequest,
+ (ResourceResponse) portletResponse);
}
return false;
diff --git a/server/src/com/vaadin/server/communication/PortletStateAwareRequestHandler.java b/server/src/com/vaadin/server/communication/PortletStateAwareRequestHandler.java
index 162c479fac..4072aae359 100644
--- a/server/src/com/vaadin/server/communication/PortletStateAwareRequestHandler.java
+++ b/server/src/com/vaadin/server/communication/PortletStateAwareRequestHandler.java
@@ -17,9 +17,11 @@ package com.vaadin.server.communication;
import java.io.IOException;
+import javax.portlet.PortletResponse;
import javax.portlet.StateAwareResponse;
import com.vaadin.server.RequestHandler;
+import com.vaadin.server.VaadinPortletResponse;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinResponse;
import com.vaadin.server.VaadinSession;
@@ -43,7 +45,12 @@ public class PortletStateAwareRequestHandler implements RequestHandler {
@Override
public boolean handleRequest(VaadinSession session, VaadinRequest request,
VaadinResponse response) throws IOException {
- if (response instanceof StateAwareResponse) {
+ if (!(response instanceof VaadinPortletResponse)) {
+ return false;
+ }
+ PortletResponse portletResponse = ((VaadinPortletResponse) response)
+ .getPortletResponse();
+ if (portletResponse instanceof StateAwareResponse) {
// StateAwareResponse is fully handled by listeners through
// PortletListenerNotifier
return true;
diff --git a/server/tests/src/com/vaadin/server/VaadinServletConfigurationTest.java b/server/tests/src/com/vaadin/server/VaadinServletConfigurationTest.java
index 3098970e6a..58b44dc3db 100644
--- a/server/tests/src/com/vaadin/server/VaadinServletConfigurationTest.java
+++ b/server/tests/src/com/vaadin/server/VaadinServletConfigurationTest.java
@@ -70,6 +70,28 @@ public class VaadinServletConfigurationTest {
}
@Test
+ public void testLegacyEnabledAnnotation() throws ServletException {
+ VaadinServlet servlet = new LegacyPropertyEnabledTestServlet();
+ servlet.init(new MockServletConfig());
+ DeploymentConfiguration configuration = servlet.getService()
+ .getDeploymentConfiguration();
+
+ Assert.assertEquals(LegacyProperyToStringMode.ENABLED,
+ configuration.getLegacyPropertyToStringMode());
+ }
+
+ @Test
+ public void testLegacyWarningAnnotation() throws ServletException {
+ VaadinServlet servlet = new LegacyPropertyWarningTestServlet();
+ servlet.init(new MockServletConfig());
+ DeploymentConfiguration configuration = servlet.getService()
+ .getDeploymentConfiguration();
+
+ Assert.assertEquals(LegacyProperyToStringMode.WARNING,
+ configuration.getLegacyPropertyToStringMode());
+ }
+
+ @Test
public void testValuesOverriddenForServlet() throws ServletException {
Properties servletInitParams = new Properties();
servletInitParams.setProperty("productionMode", "false");
@@ -102,3 +124,13 @@ public class VaadinServletConfigurationTest {
class TestServlet extends VaadinServlet {
}
+
+@VaadinServletConfiguration(productionMode = true, ui = MockUIContainingServlet.class, legacyPropertyToStringMode = LegacyProperyToStringMode.WARNING)
+class LegacyPropertyWarningTestServlet extends VaadinServlet {
+
+}
+
+@VaadinServletConfiguration(productionMode = true, ui = MockUIContainingServlet.class, legacyPropertyToStringMode = LegacyProperyToStringMode.ENABLED)
+class LegacyPropertyEnabledTestServlet extends VaadinServlet {
+
+}
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToBooleanConverter.java b/server/tests/src/com/vaadin/tests/data/converter/TestStringToBooleanConverter.java
index f236bb4000..7be922a63a 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToBooleanConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/TestStringToBooleanConverter.java
@@ -9,7 +9,7 @@ public class TestStringToBooleanConverter extends TestCase {
StringToBooleanConverter converter = new StringToBooleanConverter();
public void testNullConversion() {
- assertEquals(null, converter.convertToModel(null, null, null));
+ assertEquals(null, converter.convertToModel(null, Boolean.class, null));
}
public void testEmptyStringConversion() {
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToDateConverter.java b/server/tests/src/com/vaadin/tests/data/converter/TestStringToDateConverter.java
index 59314bd5ee..eb0e1461b2 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToDateConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/TestStringToDateConverter.java
@@ -12,7 +12,7 @@ public class TestStringToDateConverter extends TestCase {
StringToDateConverter converter = new StringToDateConverter();
public void testNullConversion() {
- assertEquals(null, converter.convertToModel(null, null, null));
+ assertEquals(null, converter.convertToModel(null, Date.class, null));
}
public void testEmptyStringConversion() {
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToDoubleConverter.java b/server/tests/src/com/vaadin/tests/data/converter/TestStringToDoubleConverter.java
index 739f9b7d5a..14691bd922 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToDoubleConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/TestStringToDoubleConverter.java
@@ -9,7 +9,7 @@ public class TestStringToDoubleConverter extends TestCase {
StringToDoubleConverter converter = new StringToDoubleConverter();
public void testNullConversion() {
- assertEquals(null, converter.convertToModel(null, null, null));
+ assertEquals(null, converter.convertToModel(null, Double.class, null));
}
public void testEmptyStringConversion() {
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToFloatConverter.java b/server/tests/src/com/vaadin/tests/data/converter/TestStringToFloatConverter.java
index 3bb2b3649e..6721a92b1a 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToFloatConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/TestStringToFloatConverter.java
@@ -9,7 +9,7 @@ public class TestStringToFloatConverter extends TestCase {
StringToFloatConverter converter = new StringToFloatConverter();
public void testNullConversion() {
- assertEquals(null, converter.convertToModel(null, null, null));
+ assertEquals(null, converter.convertToModel(null, Float.class, null));
}
public void testEmptyStringConversion() {
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToIntegerConverter.java b/server/tests/src/com/vaadin/tests/data/converter/TestStringToIntegerConverter.java
index 7f247b791f..c73853578e 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToIntegerConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/TestStringToIntegerConverter.java
@@ -9,7 +9,7 @@ public class TestStringToIntegerConverter extends TestCase {
StringToIntegerConverter converter = new StringToIntegerConverter();
public void testNullConversion() {
- assertEquals(null, converter.convertToModel(null, null, null));
+ assertEquals(null, converter.convertToModel(null, Integer.class, null));
}
public void testEmptyStringConversion() {
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToNumberConverter.java b/server/tests/src/com/vaadin/tests/data/converter/TestStringToNumberConverter.java
index 9c322cd301..66fc4f6532 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToNumberConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/TestStringToNumberConverter.java
@@ -9,7 +9,7 @@ public class TestStringToNumberConverter extends TestCase {
StringToNumberConverter converter = new StringToNumberConverter();
public void testNullConversion() {
- assertEquals(null, converter.convertToModel(null, null, null));
+ assertEquals(null, converter.convertToModel(null, Number.class, null));
}
public void testEmptyStringConversion() {
diff --git a/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java b/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java
index 63168e3c91..2a7e456fcb 100644
--- a/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java
+++ b/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java
@@ -63,7 +63,8 @@ public class TestClassesSerializable extends TestCase {
"com\\.vaadin\\.server\\.communication\\.PushConnection", //
"com\\.vaadin\\.server\\.communication\\.AtmospherePushConnection", //
"com\\.vaadin\\.util\\.ConnectorHelper", //
- "com\\.vaadin\\.server\\.VaadinSession$FutureAccess", //
+ "com\\.vaadin\\.server\\.VaadinSession\\$FutureAccess", //
+ "com\\.vaadin\\.external\\..*", //
};
/**
diff --git a/uitest/integration_tests.xml b/uitest/integration_tests.xml
index 7497bb752e..ec6bcb4c92 100644
--- a/uitest/integration_tests.xml
+++ b/uitest/integration_tests.xml
@@ -194,6 +194,12 @@
<param name="target-server" value="glassfish3" />
</antcall>
</target>
+ <target name="integration-test-glassfish4">
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="10" />
+ <param name="target-server" value="glassfish4" />
+ </antcall>
+ </target>
<target name="integration-test-liferay6">
@@ -360,6 +366,7 @@
<antcall target="integration-test-gatein3" />
<antcall target="integration-test-glassfish2" />
<antcall target="integration-test-glassfish3" />
+ <antcall target="integration-test-glassfish4" />
<antcall target="integration-test-jboss4" />
<antcall target="integration-test-jboss5" />
<antcall target="integration-test-jboss6" />
diff --git a/uitest/src/com/vaadin/tests/components/AbstractTestUI.java b/uitest/src/com/vaadin/tests/components/AbstractTestUI.java
index ec6cf0c57d..f567106d60 100644
--- a/uitest/src/com/vaadin/tests/components/AbstractTestUI.java
+++ b/uitest/src/com/vaadin/tests/components/AbstractTestUI.java
@@ -6,11 +6,14 @@ import com.vaadin.annotations.Widgetset;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet;
import com.vaadin.server.WebBrowser;
+import com.vaadin.shared.communication.PushMode;
import com.vaadin.shared.ui.label.ContentMode;
+import com.vaadin.shared.ui.ui.Transport;
import com.vaadin.ui.Component;
import com.vaadin.ui.Label;
import com.vaadin.ui.Notification;
import com.vaadin.ui.Notification.Type;
+import com.vaadin.ui.PushConfiguration;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;
@@ -35,6 +38,8 @@ public abstract class AbstractTestUI extends UI {
warnIfWidgetsetMaybeNotCompiled();
+ setTransport(request);
+
setup(request);
}
@@ -95,6 +100,26 @@ public abstract class AbstractTestUI extends UI {
}
}
+ protected void setTransport(VaadinRequest request) {
+ String transport = request.getParameter("transport");
+ PushConfiguration config = getPushConfiguration();
+ PushMode mode = config.getPushMode();
+
+ if ("xhr".equals(transport)) {
+ config.setPushMode(PushMode.DISABLED);
+ } else if ("websocket".equals(transport)) {
+ if (!mode.isEnabled()) {
+ config.setPushMode(PushMode.AUTOMATIC);
+ }
+ config.setTransport(Transport.WEBSOCKET);
+ } else if ("streaming".equals(transport)) {
+ if (!mode.isEnabled()) {
+ config.setPushMode(PushMode.AUTOMATIC);
+ }
+ config.setTransport(Transport.STREAMING);
+ }
+ }
+
private VerticalLayout layout;
protected VerticalLayout getLayout() {