]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixes #1011
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>
Sun, 21 Oct 2007 15:37:26 +0000 (15:37 +0000)
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>
Sun, 21 Oct 2007 15:37:26 +0000 (15:37 +0000)
Traced problem back to IntroWelcome.java:138. This class changes the state as a side-effect of paint, that is strictly forbidden and breaks painting.

Removing side-effect from paint in above mentioned method corrects the problem.

svn changeset:2572/svn branch:trunk

src/com/itmill/toolkit/tests/featurebrowser/IntroWelcome.java

index fb77b16231d5009593fbef2fb0284992a86726b1..79b9705e7f4ff8664c8e941cf9801b60268736bc 100644 (file)
@@ -80,10 +80,11 @@ public class IntroWelcome extends Feature implements URIHandler,
                        + " on the left and remember to experiment with the <b>Properties panel</b>"
                        + " located at the top right corner area.";
 
+       // TODO Add browser agent string
        private String description = WELCOME_TEXT_LOWER
                        + "<br /><br />IT Mill Toolkit version: "
                        + ApplicationServlet.VERSION;
-
+       
        public IntroWelcome() {
                super();
        }
@@ -135,27 +136,6 @@ public class IntroWelcome extends Feature implements URIHandler,
                return description;
        }
 
-       // Hack for #512: set description right (WebBrowser now exists)
-       public void paint(PaintTarget target) throws PaintException {
-               if (webBrowser == null) {
-                       webBrowser = (WebBrowser) getWindow().getTerminal();
-                       if (webBrowser != null) {
-                               super.getDescription().setValue(
-                                               description + "<br />Browser: "
-                                                               + webBrowser.getBrowserApplication());
-                               try {
-                                       FeatureUtil.debug(getApplication().getUser().toString(),
-                                                       "timestamp=[" + FeatureUtil.getTimestamp()
-                                                                       + "] userAgent=["
-                                                                       + webBrowser.getBrowserApplication() + "]");
-                               } catch (Exception e) {
-                                       // ignored, should never happen
-                               }
-                       }
-               }
-               super.paint(target);
-       }
-
        protected String getImage() {
                return "icon_intro.png";
        }