diff options
author | John Ahlroos <john@vaadin.com> | 2012-09-05 11:45:11 +0300 |
---|---|---|
committer | John Ahlroos <john@vaadin.com> | 2012-09-05 11:45:11 +0300 |
commit | 8f361a20c50411a152ed678a5727fddf58f55ffb (patch) | |
tree | 9d3d4de89132c2df02d4f3fa78a1f857bfe7ac89 | |
parent | 6744d2c1144301f0c36ed45356319117ebea8aae (diff) | |
parent | 65240f403416efc82fb5ff9efce682291d426e89 (diff) | |
download | vaadin-framework-8f361a20c50411a152ed678a5727fddf58f55ffb.tar.gz vaadin-framework-8f361a20c50411a152ed678a5727fddf58f55ffb.zip |
Merge branch 'master' into layoutgraph
3 files changed, 11 insertions, 6 deletions
diff --git a/server/src/com/vaadin/Application.java b/server/src/com/vaadin/Application.java index e4e49391bb..9498534b4a 100644 --- a/server/src/com/vaadin/Application.java +++ b/server/src/com/vaadin/Application.java @@ -185,6 +185,11 @@ public class Application implements Terminal.ErrorListener, Serializable { throw new IllegalStateException( "mainWindow is attached to another application"); } + if (UI.getCurrent() == null) { + // Assume setting a main window from Application.init if there's + // no current UI -> set the main window as the current UI + UI.setCurrent(mainWindow); + } this.mainWindow = mainWindow; } diff --git a/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.html b/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.html index d48ab220b5..47e766e76a 100644 --- a/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.html +++ b/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.html @@ -19,7 +19,7 @@ <tr> <td>assertText</td> <td>vaadin=runcomvaadintestsapplicationRefreshStatePreserve::/VVerticalLayout[0]/ChildComponentContainer[1]/VLabel[0]</td> - <td>Root id: 0</td> + <td>UI id: 0</td> </tr> <tr> <td>open</td> @@ -29,7 +29,7 @@ <tr> <td>assertText</td> <td>vaadin=runcomvaadintestsapplicationRefreshStatePreserve::/VVerticalLayout[0]/ChildComponentContainer[1]/VLabel[0]</td> - <td>Root id: 0</td> + <td>UI id: 0</td> </tr> <tr> <td>runScript</td> @@ -44,7 +44,7 @@ <tr> <td>assertText</td> <td>vaadin=runcomvaadintestsapplicationRefreshStatePreserve::/VVerticalLayout[0]/ChildComponentContainer[1]/VLabel[0]</td> - <td>Root id: 0</td> + <td>UI id: 0</td> </tr> </tbody></table> diff --git a/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaScrolling.java b/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaScrolling.java index f88ed0c67c..66b5a9e08a 100644 --- a/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaScrolling.java +++ b/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaScrolling.java @@ -32,9 +32,9 @@ public class RichTextAreaScrolling extends TestBase { RichTextArea second = new RichTextArea("Full height"); RichTextArea third = new RichTextArea("Undefined height"); - first.setValue(sb); - second.setValue(sb); - third.setValue(sb); + first.setValue(sb.toString()); + second.setValue(sb.toString()); + third.setValue(sb.toString()); first.setReadOnly(true); second.setReadOnly(true); |