summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java24
-rw-r--r--src/com/vaadin/ui/AbstractTextField.java4
-rw-r--r--tests/integration-testscripts/weblogic-portal/weblogic-portal-integration.html62
-rw-r--r--tests/integration_tests.xml40
-rw-r--r--tests/src/com/vaadin/tests/components/window/WindowClickEvents.html21
-rw-r--r--tests/src/com/vaadin/tests/components/window/WindowClickEvents.java10
6 files changed, 145 insertions, 16 deletions
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
index 668f3892a0..7af2159dc0 100644
--- a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
+++ b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
@@ -1564,14 +1564,17 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
* If one needs to override parts of the host page, it is suggested that one
* overrides on of several submethods which are called by this method:
* <ul>
- * <li> {@link #setAjaxPageHeaders(HttpServletResponse)
- * <li> {@link #writeAjaxPageHtmlHeadStart(BufferedWriter, HttpServletRequest)
- * <li> {@link #writeAjaxPageHtmlHeader(BufferedWriter, String, String, HttpServletRequest)
- * <li> {@link #writeAjaxPageHtmlBodyStart(BufferedWriter, HttpServletRequest)
+ * <li> {@link #setAjaxPageHeaders(HttpServletResponse)}
* <li>
- * {@link #writeAjaxPageHtmlVaadinScripts(Window, String, Application, BufferedWriter, String, String, String, HttpServletRequest)
+ * {@link #writeAjaxPageHtmlHeadStart(BufferedWriter, HttpServletRequest)}
* <li>
- * {@link #writeAjaxPageHtmlMainDiv(BufferedWriter, String, String, String, HttpServletRequest)
+ * {@link #writeAjaxPageHtmlHeader(BufferedWriter, String, String, HttpServletRequest)}
+ * <li>
+ * {@link #writeAjaxPageHtmlBodyStart(BufferedWriter, HttpServletRequest)}
+ * <li>
+ * {@link #writeAjaxPageHtmlVaadinScripts(Window, String, Application, BufferedWriter, String, String, String, HttpServletRequest)}
+ * <li>
+ * {@link #writeAjaxPageHtmlMainDiv(BufferedWriter, String, String, String, HttpServletRequest)}
* <li> {@link #writeAjaxPageHtmlBodyEnd(BufferedWriter)}
* </ul>
*
@@ -1660,8 +1663,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
+ getDefaultTheme().replaceAll("[^a-zA-Z0-9]", "");
}
- String classNames = "v-app " + themeClass + " "
- + appClass;
+ String classNames = "v-app " + themeClass + " " + appClass;
String divStyle = null;
if (request.getAttribute(REQUEST_APPSTYLE) != null) {
@@ -1737,12 +1739,12 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
* @param appId
* @param classNames
* @param divStyle
- * @param request
+ * @param request
* @throws IOException
*/
protected void writeAjaxPageHtmlMainDiv(final BufferedWriter page,
- String appId, String classNames, String divStyle, HttpServletRequest request)
- throws IOException {
+ String appId, String classNames, String divStyle,
+ HttpServletRequest request) throws IOException {
page.write("<div id=\"" + appId + "\" class=\"" + classNames + "\" "
+ (divStyle != null ? divStyle : "") + ">");
page.write("<div class=\"v-app-loading\"></div>");
diff --git a/src/com/vaadin/ui/AbstractTextField.java b/src/com/vaadin/ui/AbstractTextField.java
index cd9d99de18..ad31a46157 100644
--- a/src/com/vaadin/ui/AbstractTextField.java
+++ b/src/com/vaadin/ui/AbstractTextField.java
@@ -306,6 +306,7 @@ public abstract class AbstractTextField extends AbstractField implements
*/
public void setNullRepresentation(String nullRepresentation) {
this.nullRepresentation = nullRepresentation;
+ requestRepaint();
}
/**
@@ -325,12 +326,13 @@ public abstract class AbstractTextField extends AbstractField implements
* </p>
*
* @param nullSettingAllowed
- * Should the null-string represenation be always converted to
+ * Should the null-string representation always be converted to
* null-values.
* @see TextField#getNullRepresentation()
*/
public void setNullSettingAllowed(boolean nullSettingAllowed) {
this.nullSettingAllowed = nullSettingAllowed;
+ requestRepaint();
}
/**
diff --git a/tests/integration-testscripts/weblogic-portal/weblogic-portal-integration.html b/tests/integration-testscripts/weblogic-portal/weblogic-portal-integration.html
new file mode 100644
index 0000000000..802aa87160
--- /dev/null
+++ b/tests/integration-testscripts/weblogic-portal/weblogic-portal-integration.html
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://vaadin-integration-tests.intra.itmill.com:7001/" />
+<title>weblogic-portal-integration</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">weblogic-portal-integration</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/AddrPortal/TestPortal.portal</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=v-AddressBook_1::/VVerticalLayout[0]/ChildComponentContainer[1]/VSplitPanelHorizontal[0]/VSplitPanelVertical[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[2]/domChild[0]/domChild[0]</td>
+ <td>52,14</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>Marge_selected</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=v-AddressBook_1::/VVerticalLayout[0]/ChildComponentContainer[1]/VSplitPanelHorizontal[0]/VSplitPanelVertical[0]/VForm[0]/VHorizontalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>Marge_in_edit_mode</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=v-AddressBook_1::/VVerticalLayout[0]/ChildComponentContainer[1]/VSplitPanelHorizontal[0]/VSplitPanelVertical[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]</td>
+ <td>52,13</td>
+</tr>
+<tr>
+ <td>enterCharacter</td>
+ <td>vaadin=v-AddressBook_1::/VVerticalLayout[0]/ChildComponentContainer[1]/VSplitPanelHorizontal[0]/VSplitPanelVertical[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]</td>
+ <td>Margery</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=v-AddressBook_1::/VVerticalLayout[0]/ChildComponentContainer[1]/VSplitPanelHorizontal[0]/VSplitPanelVertical[0]/VForm[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>Margery_Simmons</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/integration_tests.xml b/tests/integration_tests.xml
index f1f16d1243..9f9ef31865 100644
--- a/tests/integration_tests.xml
+++ b/tests/integration_tests.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<project name="Test sampler deployment" basedir="." default="integration-test-all">
-
+
<!-- Target deploying demo.war -->
<fail unless="test.integration.server" message="test.integration.server must be set for integration tests to run"/>
@@ -296,7 +296,7 @@
<target name="integration-test-eXo-3">
<fileset dir="integration-testscripts" id="html-test-files" includes="eXo-3/eXo-integration.html" />
- <pathconvert pathsep=" " property="test-gatein" refid="html-test-files" />
+ <pathconvert pathsep=" " property="test-exo" refid="html-test-files" />
<subant target="run-tests" failonerror="false" antfile="test.xml">
<property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}" />
@@ -304,7 +304,24 @@
<property name="com.vaadin.testbench.deployment.url" value="${deployment.url}" />
<property name="server.start.succeeded" value="1" />
<property name="browsers" value="winxp-firefox36" />
- <property name="testfiles" value="${test-gatein}" />
+ <property name="testfiles" value="${test-exo}" />
+ <property name="test-output-dir" value="../build/integration-test-output" />
+
+ <fileset dir="." includes="test.xml" />
+ </subant>
+ </target>
+
+ <target name="integration-test-weblogic-portal">
+ <fileset dir="integration-testscripts" id="html-test-files" includes="weblogic-portal/weblogic-portal-integration.html" />
+ <pathconvert pathsep=" " property="test-weblogic" refid="html-test-files" />
+
+ <subant target="run-tests" failonerror="false" antfile="test.xml">
+ <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}" />
+ <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}" />
+ <property name="com.vaadin.testbench.deployment.url" value="http://${test.integration.server}:7001" />
+ <property name="server.start.succeeded" value="1" />
+ <property name="browsers" value="winxp-firefox36" />
+ <property name="testfiles" value="${test-weblogic}" />
<property name="test-output-dir" value="../build/integration-test-output" />
<fileset dir="." includes="test.xml" />
@@ -386,6 +403,14 @@
<target name="integration-test-stop-weblogic10">
<sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} stop-weblogic-10.3" />
</target>
+
+ <target name="integration-test-start-weblogic-portal">
+ <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} start-weblogic-portal" />
+ </target>
+
+ <target name="integration-test-stop-weblogic-portal">
+ <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} stop-weblogic-portal" />
+ </target>
<!-- Run sampler deployment test on GAE -->
<target name="integration-test-test-GAE">
@@ -555,6 +580,12 @@
<antcall target="integration-test-stop-weblogic10"/>
</target>
+ <target name="integration-test-weblogicPortal">
+ <antcall target="integration-test-start-weblogic-portal"/>
+ <antcall target="integration-test-weblogic-portal"/>
+ <antcall target="integration-test-stop-weblogic-portal"/>
+ </target>
+
<target name="integration-test-GAE">
<antcall target="integration-test-deploy-to-GAE"/>
<antcall target="integration-test-test-GAE" />
@@ -625,6 +656,9 @@
<param name="target-server" value="weblogic10"/>
</antcall>
<antcall target="run-integration-test">
+ <param name="target-server" value="weblogicPortal"/>
+ </antcall>
+ <antcall target="run-integration-test">
<param name="target-server" value="GAE"/>
</antcall>
</try>
diff --git a/tests/src/com/vaadin/tests/components/window/WindowClickEvents.html b/tests/src/com/vaadin/tests/components/window/WindowClickEvents.html
index 57092595f3..4a41374e41 100644
--- a/tests/src/com/vaadin/tests/components/window/WindowClickEvents.html
+++ b/tests/src/com/vaadin/tests/components/window/WindowClickEvents.html
@@ -51,6 +51,27 @@
<td>vaadin=runcomvaadintestscomponentswindowWindowClickEvents::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VLabel[0]</td>
<td>4. Click using left on Sub window</td>
</tr>
+<!--Clicking on the button should not produce a window click event-->
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentswindowWindowClickEvents::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentswindowWindowClickEvents::PID_SLog_row_0</td>
+ <td>5. Click on button</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentswindowWindowClickEvents::PID_SLog_row_2</td>
+ <td>3. Click using left on Sub window layout</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentswindowWindowClickEvents::PID_SLog_row_1</td>
+ <td>4. Click using left on Sub window</td>
+</tr>
</tbody></table>
</body>
</html>
diff --git a/tests/src/com/vaadin/tests/components/window/WindowClickEvents.java b/tests/src/com/vaadin/tests/components/window/WindowClickEvents.java
index 4748111fd6..041ccaaf30 100644
--- a/tests/src/com/vaadin/tests/components/window/WindowClickEvents.java
+++ b/tests/src/com/vaadin/tests/components/window/WindowClickEvents.java
@@ -56,7 +56,15 @@ public class WindowClickEvents extends TestBase {
Label l = new Label("This window is centered");
l.setSizeUndefined();
- Button b = new Button("Clicking here should not produce an event");
+ Button b = new Button(
+ "Clicking here should not produce a layout click event");
+ b.addListener(new Button.ClickListener() {
+
+ public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
+ log.log("Click on button");
+ }
+
+ });
centered.addComponent(l);
centered.addComponent(b);