aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java8
-rw-r--r--src/com/itmill/toolkit/tests/layouts/VerticalLayoutExpandRatioModification.java6
2 files changed, 12 insertions, 2 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java
index 2b0be73c58..f875fee465 100644
--- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java
+++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java
@@ -151,6 +151,14 @@ public class IOrderedLayout extends CellBasedLayout {
if (isDynamicWidth()) {
childComponentContainer.renderChild(childUIDL, client, 0);
+ } else if (Util.isCached(childUIDL)) {
+ /*
+ * We must update the size of the relative sized component if
+ * the expand ratio or something else in the layout changes
+ * which affects the size of a relative sized component
+ */
+ client.handleComponentRelativeSize(childComponentContainer
+ .getWidget());
} else {
childComponentContainer.renderChild(childUIDL, client,
activeLayoutSize.getWidth());
diff --git a/src/com/itmill/toolkit/tests/layouts/VerticalLayoutExpandRatioModification.java b/src/com/itmill/toolkit/tests/layouts/VerticalLayoutExpandRatioModification.java
index 5f14455ab6..3277466adb 100644
--- a/src/com/itmill/toolkit/tests/layouts/VerticalLayoutExpandRatioModification.java
+++ b/src/com/itmill/toolkit/tests/layouts/VerticalLayoutExpandRatioModification.java
@@ -3,6 +3,7 @@ package com.itmill.toolkit.tests.layouts;
import com.itmill.toolkit.tests.components.TestBase;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.Label;
+import com.itmill.toolkit.ui.TextField;
import com.itmill.toolkit.ui.VerticalLayout;
import com.itmill.toolkit.ui.Window;
import com.itmill.toolkit.ui.Button.ClickEvent;
@@ -33,8 +34,9 @@ public class VerticalLayoutExpandRatioModification extends TestBase implements
// The bottom layout
vl2 = new VerticalLayout();
- Label label2 = new Label("The bottom layout");
- vl2.addComponent(label2);
+ TextField tf = new TextField("The bottom field");
+ tf.setHeight("100%");
+ vl2.addComponent(tf);
// Add everything to the view
mainLayout.addComponent(vl1);