diff options
author | Jonatan Kronqvist <jonatan.kronqvist@itmill.com> | 2011-01-18 10:59:40 +0000 |
---|---|---|
committer | Jonatan Kronqvist <jonatan.kronqvist@itmill.com> | 2011-01-18 10:59:40 +0000 |
commit | 5759c381274ec38ae6039f539f3ce8906e940742 (patch) | |
tree | fbd7a358720ba0d991e4e32a90878cac3f32fe12 /src/com | |
parent | bfb4bd3ffe8136160ab3b277775c94d40ac5e62c (diff) | |
download | vaadin-framework-5759c381274ec38ae6039f539f3ce8906e940742.tar.gz vaadin-framework-5759c381274ec38ae6039f539f3ce8906e940742.zip |
Fixes #5912 - Portlet no longer generates div with duplicate id
svn changeset:16920/svn branch:6.5
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java b/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java index 92d2ede583..8e586f5ee5 100644 --- a/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java +++ b/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java @@ -805,7 +805,7 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet Application newApplication = getNewApplication(request); final PortletApplicationContext2 context = PortletApplicationContext2 .getApplicationContext(request.getPortletSession()); - context.addApplication(newApplication, request.getWindowID()); + context.addApplication(newApplication, getDecoratedWindowID(request)); return newApplication; } @@ -822,8 +822,8 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet PortletApplicationContext2 context = PortletApplicationContext2 .getApplicationContext(session); - Application application = context.getApplicationForWindowId(request - .getWindowID()); + Application application = context + .getApplicationForWindowId(getDecoratedWindowID(request)); if (application == null) { return null; } @@ -936,11 +936,15 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet } writeAjaxPageHtmlMainDiv(request, response, page, - request.getWindowID(), classNames, divStyle); + getDecoratedWindowID(request), classNames, divStyle); page.close(); } + private String getDecoratedWindowID(PortletRequest request) { + return "v-" + request.getWindowID(); + } + /** * This method writes the scripts to load the widgetset and the themes as * well as define Vaadin configuration parameters on the HTML fragment that @@ -1132,8 +1136,8 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet RenderResponse response, final BufferedWriter writer, Map<String, String> config) throws IOException, PortletException { - writer.write("vaadin.vaadinConfigurations[\"" + request.getWindowID() - + "\"] = {"); + writer.write("vaadin.vaadinConfigurations[\"" + + getDecoratedWindowID(request) + "\"] = {"); Iterator<String> keyIt = config.keySet().iterator(); while (keyIt.hasNext()) { |