summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2011-03-24 11:32:16 +0000
committerArtur Signell <artur.signell@itmill.com>2011-03-24 11:32:16 +0000
commit3e02fb83101b107935c6466d27c20065951faca0 (patch)
tree270c7a698cac978e6a60c5958e9e10a6bb237ec7 /src
parent24eccbb910ebdbccba22b8dbc14faef4e5e661a4 (diff)
downloadvaadin-framework-3e02fb83101b107935c6466d27c20065951faca0.tar.gz
vaadin-framework-3e02fb83101b107935c6466d27c20065951faca0.zip
#6685 servlet fix applied to portlets aswell
Clear the whole app div before adding any content svn changeset:17909/svn branch:6.5
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VView.java14
-rw-r--r--src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java7
2 files changed, 12 insertions, 9 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VView.java b/src/com/vaadin/terminal/gwt/client/ui/VView.java
index 70b5388405..b2be2a6daf 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VView.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VView.java
@@ -675,14 +675,16 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
DOM.setElementProperty(getElement(), "tabIndex", "1");
RootPanel root = RootPanel.get(rootPanelId);
- Element rootElement = root.getElement();
- if (rootElement.getChildCount() == 1) {
- // Remove any "v-app-loading" div
- rootElement.getChild(0).removeFromParent();
- }
- root.add(this);
+
+ // Remove the v-app-loading or any splash screen added inside the div by
+ // the user
+ root.getElement().setInnerHTML("");
+ // For backwards compatibility with static index pages only.
+ // No longer added by AbstractApplicationServlet/Portlet
root.removeStyleName("v-app-loading");
+ root.add(this);
+
BrowserInfo browser = BrowserInfo.get();
// set focus to iview element by default to listen possible keyboard
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java b/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java
index 4f93afff56..e64cd6f243 100644
--- a/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java
+++ b/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java
@@ -926,8 +926,7 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
String themeClass = "v-theme-"
+ themeName.replaceAll("[^a-zA-Z0-9]", "");
- String classNames = "v-app v-app-loading " + themeClass + " "
- + appClass;
+ String classNames = "v-app " + themeClass + " " + appClass;
String style = getApplicationProperty(PORTLET_PARAMETER_STYLE);
String divStyle = "";
@@ -1225,7 +1224,9 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
RenderResponse response, final BufferedWriter writer, String id,
String classNames, String divStyle) throws IOException {
writer.write("<div id=\"" + id + "\" class=\"" + classNames + "\" "
- + divStyle + "></div>\n");
+ + divStyle + ">");
+ writer.write("<div class=\"v-app-loading\"></div>");
+ writer.write("</div>\n");
writer.write("<noscript>" + getNoScriptMessage() + "</noscript>");
}