]> source.dussan.org Git - vaadin-framework.git/commitdiff
Updated test case and fix for #2477 for IOrderedLayout - recalculate size of relative...
authorArtur Signell <artur.signell@itmill.com>
Wed, 21 Jan 2009 15:06:59 +0000 (15:06 +0000)
committerArtur Signell <artur.signell@itmill.com>
Wed, 21 Jan 2009 15:06:59 +0000 (15:06 +0000)
svn changeset:6613/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java
src/com/itmill/toolkit/tests/layouts/VerticalLayoutExpandRatioModification.java

index 2b0be73c5836c9751a9da5ddfc4ba17579965db4..f875fee46564c874df8f3e3db2ca4c85db9ab84d 100644 (file)
@@ -151,6 +151,14 @@ public class IOrderedLayout extends CellBasedLayout {
 \r
             if (isDynamicWidth()) {\r
                 childComponentContainer.renderChild(childUIDL, client, 0);\r
+            } else if (Util.isCached(childUIDL)) {\r
+                /*\r
+                 * We must update the size of the relative sized component if\r
+                 * the expand ratio or something else in the layout changes\r
+                 * which affects the size of a relative sized component\r
+                 */\r
+                client.handleComponentRelativeSize(childComponentContainer\r
+                        .getWidget());\r
             } else {\r
                 childComponentContainer.renderChild(childUIDL, client,\r
                         activeLayoutSize.getWidth());\r
index 5f14455ab6d93c37c3f6c99f4eb12108225c40df..3277466adbcc055e1dab049db40f931aa12da446 100644 (file)
@@ -3,6 +3,7 @@ package com.itmill.toolkit.tests.layouts;
 import com.itmill.toolkit.tests.components.TestBase;\r
 import com.itmill.toolkit.ui.Button;\r
 import com.itmill.toolkit.ui.Label;\r
+import com.itmill.toolkit.ui.TextField;\r
 import com.itmill.toolkit.ui.VerticalLayout;\r
 import com.itmill.toolkit.ui.Window;\r
 import com.itmill.toolkit.ui.Button.ClickEvent;\r
@@ -33,8 +34,9 @@ public class VerticalLayoutExpandRatioModification extends TestBase implements
 \r
         // The bottom layout\r
         vl2 = new VerticalLayout();\r
-        Label label2 = new Label("The bottom layout");\r
-        vl2.addComponent(label2);\r
+        TextField tf = new TextField("The bottom field");\r
+        tf.setHeight("100%");\r
+        vl2.addComponent(tf);\r
 \r
         // Add everything to the view\r
         mainLayout.addComponent(vl1);\r