From ff5f72cba9b3428d310466c5bf23378457a05737 Mon Sep 17 00:00:00 2001 From: John Alhroos Date: Tue, 8 Mar 2011 07:45:14 +0000 Subject: Fixed flash issues and cleans up the Flash related code. #6501 svn changeset:17651/svn branch:6.5 --- .../vaadin/terminal/gwt/client/ui/VEmbedded.java | 118 ++++++++++++++++----- 1 file changed, 89 insertions(+), 29 deletions(-) (limited to 'src/com/vaadin/terminal') diff --git a/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java b/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java index f1d61029d4..8b18439b52 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java @@ -1,4 +1,4 @@ -/* +/* @ITMillApache2LicenseForJavaFiles@ */ @@ -137,35 +137,9 @@ public class VEmbedded extends HTML implements Paintable { } else if (uidl.hasAttribute("mimetype")) { final String mime = uidl.getStringAttribute("mimetype"); if (mime.equals("application/x-shockwave-flash")) { - addStyleName(CLASSNAME + "-flash"); - String html = ""; + // Handle embedding of Flash + setHTML(createFlashEmbed(uidl)); - Map parameters = getParameters(uidl); - if (parameters.get("movie") == null) { - parameters.put("movie", getSrc(uidl, client)); - } - - // Add the parameters to the Object - for (String name : parameters.keySet()) { - html += ""; - } - - html += ""); + + // Ensure we have an movie parameter + Map parameters = getParameters(uidl); + if (parameters.get("movie") == null) { + parameters.put("movie", getSrc(uidl, client)); + } + + // Add parameters to OBJECT + for (String name : parameters.keySet()) { + html.append(""); + } + + // Build inner EMBED tag + html.append(""); + + // End object tag + html.append(""); + + return html.toString(); + } + /** * Escapes the string so it is safe to write inside an HTML attribute. * -- cgit v1.2.3