]> source.dussan.org Git - vaadin-framework.git/commitdiff
Window.open now opens in current window if no name (target) is given.
authorMarc Englund <marc.englund@itmill.com>
Fri, 9 Nov 2007 08:40:24 +0000 (08:40 +0000)
committerMarc Englund <marc.englund@itmill.com>
Fri, 9 Nov 2007 08:40:24 +0000 (08:40 +0000)
Width and height still not supported.

svn changeset:2771/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IView.java

index 80184505e4ab9c9d1fa5af67ea04a2b2a5d7366f..fc2fcf0a2d6771fc46be13942b568748dcf72923 100644 (file)
@@ -65,8 +65,13 @@ public class IView extends SimplePanel implements Paintable,
                                && "open".equals(uidl.getChildUIDL(childIndex).getTag())) {
                        UIDL open = uidl.getChildUIDL(childIndex);
                        String url = open.getStringAttribute("src");
-                       String target = open.getStringAttribute("target");
-                       Window.open(url, target != null ? target : null, "");
+                       String target = open.getStringAttribute("name");
+                       if (target == null) {
+                               goTo(url);
+                       } else {
+                               // TODO width & height
+                               Window.open(url, target != null ? target : null, "");
+                       }
                        childIndex++;
                }
 
@@ -155,4 +160,9 @@ public class IView extends SimplePanel implements Paintable,
                Util.runDescendentsLayout(this);
        }
 
+       public native static void goTo(String url)
+       /*-{
+          $wnd.location = url;
+        }-*/;
+
 }